 <?php 

session_start();

if (empty($_SESSION["id_usu"])) 
  {
    ?>
		<script type="text/javascript">window.location="index.php"; </script> 
<?php  
  }
 
include("conexion.php");

$sql = mysql_query("SELECT * FROM tipokar",$conn) or die(mysql_error());
$not = mysql_query("SELECT * FROM notarios",$conn) or die(mysql_error());
$doc =mysql_query("SELECT * FROM tipodocumento",$conn) or die(mysql_error());
$sqlmon=mysql_query("SELECT * FROM monedas",$conn) or die(mysql_error()); 
$sqltpago=mysql_query("SELECT * FROM mediospago",$conn) or die(mysql_error()); 
$sqlbancos=mysql_query("SELECT * FROM bancos",$conn) or die(mysql_error()); 
$sqlsedess=mysql_query("SELECT * FROM sedesregistrales",$conn) or die(mysql_error()); 
$sqloporpago = mysql_query("SELECT * FROM oporpago",$conn) or die(mysql_error());
$sqltbienn   = mysql_query("SELECT * FROM tipobien",$conn) or die(mysql_error());


$sqlsede =mysql_query("SELECT * FROM sedesregistrales",$conn) or die(mysql_error());
$sqlsec =mysql_query("SELECT * FROM seccionesregistrales",$conn) or die(mysql_error());
$sqltra =mysql_query("SELECT * FROM tipotramogestion",$conn) or die(mysql_error());
$sqlestra=mysql_query("SELECT * FROM estadoregistral",$conn) or die(mysql_error());
$coduser=$_SESSION["id_usu"];
$sqluser=mysql_query("SELECT * FROM usuarios where idusuario='$coduser'",$conn) or die(mysql_error());
$rowwuser=mysql_fetch_array($sqluser);

$Hora= date('H:i:s');
$horaingreso= $Hora;
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="JavaScript" type="text/javascript" src="ajax.js"></script>
<script src="jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.uniform.js" type="text/javascript" charset="utf-8"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script type="text/javascript" src="tcal.js"></script> 
<script type="text/javascript" src="mantenimiento/includes/jquery.scrollableFixedHeaderTable.js"></script>

<script type="text/javascript">
function fShowDetail(obj)
		{/*
			var _id = obj.cells[0].innerHTML;
			var _gridView = document.getElementById('gridPatrimonial');
			var _rows  = _gridView.rows.length;
			for(i=1;i<=_rows-1;i++)
				{
					if(i%2==0)
						{
							//_gridView.rows[i].style.backgroundColor = '#F2EFDF';
							_gridView.rows[i].style.backgroundColor = '#FFFFFF';
						}
					else
						{
							//_gridView.rows[i].style.backgroundColor = '#9BBFAB';
							_gridView.rows[i].style.backgroundColor = '#FFFFFF';
						}
				}

			//obj.style.backgroundColor = '#9BBFAB'; 
			obj.style.backgroundColor = '#656F8C'; 
			
			var fil=obj.id;
			//document.getElementById('txtfilas').value=fil;

			    //_datos =  $GridData(obj);
				//document.getElementById('codclie').value = _datos[0];
*/
		}
/*Code By CarlosPC.net*/
$(document).ready(function() {
$(".Contenido").hide(); //Para ocultar los DIV's con contenido
$("ul.tabs li:first").addClass("active").show(); //Activamos el primer TAB
$(".Contenido:first").show(); //Muestra el contenido respectivo al primer TAB
 
//Al clickar sobre los Tabs
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active"); //Anula todas las selecciones
$(this).addClass("active"); //Asigna la clase Active al TAB Seleccionado
$(".Contenido").hide(); //Esconde todo el contenido de la tab
var activeTab = $(this).find("a").attr("href"); //Ubica los valores HREF y A para enlazarlos y activarlos
$(activeTab).fadeIn(); //Habilita efecto Fade en la transición de contenidos
return false;
});
});


</script>

<script type="text/javascript" charset="utf-8">
      $(function(){
        $("input, textarea, select, button").uniform();
      });
    </script>

<link rel="stylesheet" href="css/uniform.default.css" type="text/css" media="screen">

<script type="text/javascript">

function validarcontra()
    {  
      grabarcontratantes();
	 // mostrarcontratante();
	  
	  ocultar_desc('clienbus');   
    }
	


function mostrar_desc(objac)
		{
		
		if(document.getElementById(objac).style.display=="none")
		document.getElementById(objac).style.display=""
		else
		document.getElementById(objac).style.display="";
		}
		

function ocultar_desc(objac2)
		{
		
		if(document.getElementById(objac2).style.display=="")
		document.getElementById(objac2).style.display="none";
		else
		document.getElementById(objac2).style.display="none";
		}	


function hhh()
    { 
	  mostrar_desc('conyugesss2');
	 }	
function format(){
	//document.getElementById('tipoper').selectedIndex='0';
	document.getElementById('tipoper').value='A';

	}
	 
function asi1()
    { 
	var divdoc = document.getElementById('tipodocuR');
	//document.getElementById('tipoper').value='';
	if(divdoc.innerHTML!='')
	{document.getElementById('tipodoc').selectedIndex='0';}
	
	  limpiarbucaclie();
	  mostrar_desc('clienbus');
	  limpiacli();
	 }
function asi2()
    { 
	 listarcontrata();
	 mostrar_desc('clienedit');
	 } 
	 
function asi3()
    { 
	tipoacto();
	mostrar_desc('menuactos');
	ocultar_desc('menuactos2');
	 } 
	 
function listarbienesss(){
listadobien();
}

function asi4()
    { 
	tipoacto2kit();
	mostrar_desc('menuactos2');
	ocultar_desc('menuactos');
	 } 
	  	
function gbbiennes()
    { 
	  addgbbiens();
	  alert("Bien, grabado satisfactoriamente");
	  ocultar_desc('newbiennnes');
       listadobien();
	  }
	
function validarpago()
    {  //vertipoactopat();
       mostrar_desc('vpago');
       ocultar_desc('vbien');
	   ocultar_desc('vuif');
    }
function clienteeditado()
    {  verclientee();
       mostrar_desc('editaclie')
    }


function ggclie1()
    {   
	var _apepat = document.getElementById('apepat');
	var _prinom = document.getElementById('prinom');
	var _apemat = document.getElementById('apemat');
	var _dire   = document.getElementById('direccion');
	var _ecivil = document.getElementById('idestcivil');
	var _ubigensc = document.getElementById('ubigensc');
	var _sexo   = document.getElementById('sexo');
	var _nomprofesiones   = document.getElementById('nomprofesiones');
	var _nomcargoss   = document.getElementById('nomcargoss');
	
	
	
	if( _apepat.value == '' || _prinom.value == '' || _apemat.value == '' || _dire.value == '' || _ecivil.selectedIndex=='0' || _ubigensc.value == '' || _sexo.selectedIndex == '0' || _nomprofesiones.value == '' || _nomcargoss.value == '')
	
	{alert('Faltan ingresar datos');return;}
	else{
	   grabarcliente();
	   alert("Cliente grabado satisfactoriamente");
		}
  
    }


function ggclie2()
    {   
	   grabarcliente2();
	   ocultar_desc('conyugesss');
	   alert("Conyuge grabado satisfactoriamente");
    }
	
	
function ggclie7()
    {   
	   grabarcliente7();
	   ocultar_desc('conyugesss2');
	   alert("Conyuge grabado satisfactoriamente");
    }

function ggclie4()
    {   
	   grabarcliente4();
	   ocultar_desc('conyugesss');
	   alert("Conyuge grabado satisfactoriamente");
    }
function ggclie3()
    {   
	   grabarcliente3();
	   ocultar_desc('editaclie');
	   alert("Cliente Grabado satisfactoriamente");
    }
// #====================================================================================
//GRABA MEDIO PAGO	
function gmediopago()
    {   
	   actmediopago();
	   ocultar_desc('vermediopagoedit');
	   //mostrarlistmpp();
	   
    }	

function muesdiveditar(_obj)
    {   
	    document.getElementById('detmpx').value = _obj;
		vermediopagoe();
		mostrar_desc('vermediopagoedit');
    }


function calcularasigna(name,id,valor){
	
	document.frmprotocolares.xasignacontra.value=name;
	document.frmprotocolares.xasignacondi.value=id;
	document.frmprotocolares.xasignavalor.value=valor;
	
	}
	
function recal(name,id,valor){
	
	document.frmprotocolares.xasignacontra.value=name;
	document.frmprotocolares.xasignacondi.value=id;
	document.frmprotocolares.xasignavalor.value=valor;
	recalcularasignass();
	//alert('hola');
	
	
	}	
// #====================================================================================
// #====================================================================================
//PARA ACUALIZAR BIENES
function gbienesedit()
    {   
	   actbienes();
	   ocultar_desc('verbienesedit');
	   //mostrarlistmpp();
	   
    }	

function muesbieneditable(_obj)
    {   
	    document.getElementById('detbienx').value = _obj;
		verbienese();  
		mostrar_desc('verbienesedit');
    }
	
// almacena numero de placa, etc. para editar
function selecpsm2(valor)
    {  document.getElementById('tpsm2').value = valor;
    }	
// para mostrar la edicion de num placa, etc.
function enviarvalores2(valor)
    {   
	if(valor=="8"){
	mostrar_desc('vterrestres2');
	ocultar_desc('mequipos2');
	ocultar_desc('oespecificos2');
	/*document.getElementById('tpsm2').value="";
	document.getElementById('npsm2').value="" ;
	document.getElementById('oespecific2').value="" ;
	document.getElementById('smaquiequipo2').value="";*/
	}
		
	if(valor=="5"){
	mostrar_desc('mequipos2');
	ocultar_desc('vterrestres2');
	ocultar_desc('oespecificos2');
	/*document.getElementById('tpsm2').value="";
	document.getElementById('npsm2').value="" ;
	document.getElementById('oespecific2').value="";
	document.getElementById('smaquiequipo2').value="" ;*/
	}
		
	if(valor=="10"){
	mostrar_desc('oespecificos2');
	ocultar_desc('vterrestres2');
	ocultar_desc('mequipos2');
	/*document.getElementById('tpsm2').value="";
	document.getElementById('npsm2').value="" ;
	document.getElementById('oespecific2').value="" ;
	document.getElementById('smaquiequipo2').value="" ;*/
	}
	
	if(valor!="5" && valor!="8" && valor!="10"){ 
	ocultar_desc('vterrestres2');
	ocultar_desc('mequipos2');
	ocultar_desc('oespecificos2');
	/*document.getElementById('tpsm2').value="" ;
	document.getElementById('npsm2').value="";
	document.getElementById('oespecific2').value="" ;
	document.getElementById('smaquiequipo2').value="" ;*/
	}
    }
	
	
// #====================================================================================
function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
// EDITAR  MEDIO DE PAGO
function vermediopagoe()
{
	//donde se mostrará el resultado
	divResultado = document.getElementById('vermediopagoedit');
	//tomamos el valor de la lista desplegable
	detmp = document.getElementById('detmpx').value; // hidden
	//instanciamos el objetoAjax
	ajax=objetoAjax();
	//usamos el medoto POST
	//archivo que realizará la operacion
	//datoscliente.php
	ajax.open("POST","mostrar_mpagoedit.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {
			//mostrar resultados en esta capa
			divResultado.innerHTML = ajax.responseText;
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("detmp="+detmp)
	
} 
//////  ACTUALIZA MEDIO DE PAGO
function actmediopago()
{
	//donde se mostrará el resultado
	//divResultado = document.getElementById('tredfdfdf');
	//tomamos el valor de la lista desplegable
	
	codkardex = document.getElementById('codkardex').value;
	mediopago2 = document.getElementById('mediopago2').value;
	entidadfinanciera2 = document.getElementById('entidadfinanciera2').value;
	impmediopago2 = document.getElementById('impmediopago2').value;
	fechaoperacion2 = document.getElementById('fechaoperacion2').value;
	documentos2 = document.getElementById('documentos2').value;
    itemmpp = document.getElementById('detmpx').value;
	
	//alert(itemmpp+codkardex+documentos2);
	ajax=objetoAjax();
	
	ajax.open("POST","grabar_editpago.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {
			//mostrar resultados en esta capa
			alert("Se actualizo medio de pago");
			//divResultado.innerHTML = ajax.responseText; 
			mostrarlistmpp();
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("&codkardex="+codkardex+"&mediopago="+mediopago2+"&entidadfinanciera="+entidadfinanciera2+"&impmediopago="+impmediopago2+"&fechaoperacion="+fechaoperacion2+"&documentos="+documentos2+"&detmp="+itemmpp)
	
}
///// PARA VER DATOS BIENES EDITABLE:
function verbienese()
{

	divResultado = document.getElementById('verbienesedit');

	detbien = document.getElementById('detbienx').value; // hidden

	ajax=objetoAjax();

	ajax.open("POST","mostrar_bienesedita.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {

			divResultado.innerHTML = ajax.responseText;
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

	ajax.send("detbien="+detbien)
	
} 
///// ACTUALIZAR BIENES.
function actbienes()
{ 
	codkardex = document.getElementById('codkardex').value;
	detbienx = document.getElementById('detbienx').value
	
	tipob2 = document.getElementById('tipob2').value;
	tipobien2 = document.getElementById('tipobien2').value;
	ubigens2 = document.getElementById('ubigens2').value;
	fechaconst2 = document.getElementById('fechaconst2').value;
	codubis2 = document.getElementById('codubis2').value;
    npsm2 = document.getElementById('npsm2').value;
	tpsm2 = document.getElementById('tpsm2').value;
	smaquiequipo2 = document.getElementById('smaquiequipo2').value;
	oespecific2 = document.getElementById('oespecific2').value;
	
	
	//alert(itemmpp+codkardex+documentos2);
	ajax=objetoAjax();
	
	ajax.open("POST","editar_bien.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {
			//mostrar resultados en esta capa
			alert("Se actualizo datos del bien");
			//divResultado.innerHTML = ajax.responseText; 
			 listadobien();
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("&codkardex="+codkardex+"&detbienx="+detbienx+"&tipob2="+tipob2+"&tipobien2="+tipobien2+"&ubigens2="+ubigens2+"&fechaconst2="+fechaconst2+"&codubis2="+codubis2+"&npsm2="+npsm2+"&tpsm2="+tpsm2+"&smaquiequipo2="+smaquiequipo2+"&oespecific2="+oespecific2)
	
}
////////////////////////////////////////////////////////////////
function buscaubigeoss2()
{ 	divResultado = document.getElementById('resulubis2');
	buscaubis2 = document.getElementById('buscaubis22').value; 
		
	ajax=objetoAjax();
	ajax.open("POST","buscarubigeos2.php",true);
	ajax.onreadystatechange=function() {
		if ((ajax.readyState==4 && ajax.status==200)) {
			divResultado.innerHTML = ajax.responseText;
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send("buscaubis="+buscaubis2)
}
////////////////////////////////////////////////////////////////


/////
// ############### MUESTRA LISTADO PATRIMONIAL ################
function listapagosall()
{

	divResultado = document.getElementById('listpatrimonio');

	cod = document.getElementById('codkardex').value;
	ajax=objetoAjax();

	ajax.open("POST","list_patrimonio.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {
			
				divResultado.innerHTML = ajax.responseText; 
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("&cod="+cod)	
}

function ggclie6()
    {   
	   grabarcliente6();
	   ocultar_desc('conyugesss2');
	   alert("Conyuge Cambiado satisfactoriamente");
    }
	
function casadito(valor)
{
   if(valor==2){
    mostrar_desc('casado');
   }else{
    ocultar_desc('casado');
}

}	
function casadito2(valor)
{
   if(valor==2){
    mostrar_desc('casado2');
   }else{
    ocultar_desc('casado2');
   }
}

function selecpsm(valor)
    {  document.frmprotocolares.tpsm.value=valor;
    }	
	
function actkardex()
    {  actualizarkardex();
       alert("Kardex Actualizado");
    }

function enviarvalores(valor)
    {   
	if(valor=="8"){
	mostrar_desc('vterrestres');
	ocultar_desc('mequipos');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
		
	if(valor=="5"){
	mostrar_desc('mequipos');
	ocultar_desc('vterrestres');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
		
	if(valor=="10"){
	mostrar_desc('oespecificos');
	ocultar_desc('vterrestres');
	ocultar_desc('mequipos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
	
	if(valor!="5" && valor!="8" && valor!="10"){ 
	ocultar_desc('vterrestres');
	ocultar_desc('mequipos');
	ocultar_desc('oespecificos');
	document.frmprotocolares.tpsm.value="";
	document.frmprotocolares.npsm.value="";
	document.frmprotocolares.oespecific.value="";
	document.frmprotocolares.smaquiequipo.value="";
	}
    }

function limpiconyuge()
    { document.frmprotocolares.cconyuge.value="";
	document.frmprotocolares.cconyuge2.value="";
	document.frmprotocolares.cconyuge3.value="";
	document.frmprotocolares.cconyuge4.value="";
	document.frmprotocolares.cconyuge7.value="";
	document.frmprotocolares.cconyuge6.value="";
    }

//// verificar que se escoja el acto.
function validaIngreso()
{
var _docu = document.getElementById('numdoc');	
var _tipdoc = document.getElementById('tipodoc');

if(_tipdoc.value=='1')
{ 
	_docu.setAttribute('maxlength','8');
	if(_docu.value.length < 8)
	{alert('Debe ingresar el acto');return false;}
	else {return true;}
}
if(_tipdoc.value=='8')
{
	if(_docu.value.length < 11)
	{alert('Debe ingresar el acto');return false;}
	else {return true;}
}

}

/////////////////////////////////////
	
function validarbien()
    {  
	   mostrar_desc('vbien');
       ocultar_desc('vpago');
       ocultar_desc('vuif');
    }
	
/// validar antes de grabar los datos del medio de pago	
function fgrabMediopago()
{
var _tipoactopatri = document.getElementById('tipoactopatri');	
var _imptrans = document.getElementById('imptrans');
var _nnminuta = document.getElementById('nnminuta');

	if(_tipoactopatri.value=='0')
	{
		alert('Debe ingresar el acto');return false;
	}
	else if(_imptrans.value=='' || _nnminuta.value=='') 
	{
		alert('Falta ingresar datos');return false;
		}
	else {
		return true;
		}

}
//  graba medio de pago.
/////////////////////////////////
function grabarmediopago()
    { 
	  if(fgrabMediopago()==true)
	  {
	   	  grabarmp();
		  //mostrar_desc('editmp');
	      //ocultar_desc('gbrmp'); 
		  alert("Datos Grabados Satisfactoriamente");
	  }	
    }
	
function grabaruifp()
    { grabaruifppp();
	  mostrar_desc('edituifp');
      ocultar_desc('gbruifp'); 
	  alert("Datos Grabados Satisfactoriamente");  
    }

function editarmediopago()
    { editarmp();
	  alert("Datos Actualizados Satisfactoriamente");  
    }
	
function editarruifp()
    { editaruifp();
	  alert("Datos Actualizados Satisfactoriamente");  
    }
	

function elimrrpp()
    { elimmrp();
	  alert("Registro Eliminado Satisfactoriamente");  
	  mostrarnewreg();
    }

function edimrrpp()
{ 
  vermovimientorp();
  mostrar_desc('editmrrpp');
  
}
function newgbrmp()
    {  
	    gggppp();
		mostrar_desc('listmedpago');
		ocultar_desc('regmedpago');
	    //mostrarlistmpp();
	    alert("Medio de Pago Grabado Satisfactoriamente");
    }
	

function validaruif()
    {   
	   mostrar_desc('vuif');
       ocultar_desc('vpago');
       ocultar_desc('vbien');
    }

function vermedio(valor)
    { 
    if(valor=="SI")mostrar_desc('newpagoo');
	else ocultar_desc('newpagoo');
	if(valor=="NO")ocultar_desc('newpagoo');
	else mostrar_desc('newpagoo');
    }

function vernewpatri()
    {   
		validarpago();
		vertipoactopat();
		mostrar_desc('newpatrimonio');
	    ocultar_desc('listpatrimonio');
		ocultar_desc('listmedpago');
		ocultar_desc('newpagoo');
		ocultar_desc('vterrestres');
		ocultar_desc('mequipos');
		ocultar_desc('oespecificos');
		document.frmprotocolares.ubigens.value="";
		document.frmprotocolares.fechaconst.value="";
		document.frmprotocolares.imptrans.value="";
		document.frmprotocolares.nnminuta.value="";
		document.frmprotocolares.tipcambio.value="";
		document.frmprotocolares.codubis.value="";
		document.frmprotocolares.pregis.value="";
		document.frmprotocolares.ofpago.value="";
		document.frmprotocolares.impmediopago.value="";
		document.frmprotocolares.fechaoperacion.value="";
		document.frmprotocolares.documentos.value="";
		document.frmprotocolares.idttiippooacto.value="";
		
		
		
    }

function mmmppp()
    {   mostrar_desc('regmedpago');
	    ocultar_desc('listmedpago'); 
		document.frmprotocolares.impmediopago.value="";
     document.frmprotocolares.fechaoperacion.value="";
	document.frmprotocolares.documentos.value="";
    }

function verlistpatri()
    {   listapagosall();
	    mostrar_desc('listpatrimonio');
	    ocultar_desc('newpatrimonio');
    }

function agregarbienes()
    {   mostrar_desc('newbiennnes');
	      document.frmprotocolares.ubigens.value="";
          document.frmprotocolares.fechaconst.value="";
	      document.frmprotocolares.codubis.value="";
	      document.frmprotocolares.npsm.value="";
	      document.frmprotocolares.tpsm.value="";
		  document.frmprotocolares.smaquiequipo.value="";
	      document.frmprotocolares.oespecific.value="";

    }

function cambiar()
    {    tipoacto();
	      //mostrar_desc('menuactos');
		  document.frmprotocolares.referencia.value="";
          document.frmprotocolares.codactos.value="";
			document.frmprotocolares.contrato.value="";
			document.frmprotocolares.dregistral.value="";
			document.frmprotocolares.dnotarial.value="";
			document.frmprotocolares.kardexconexo.value="";
			document.frmprotocolares.idnotario.value="";
	 
    }


function limpiacli()
    {   document.frmprotocolares.numdoc.value="";
    }

function estadorrpp(valor)
{
    document.frmprotocolares.conestado.value = valor;

	if(valor=="I"){
	mostrar_desc('ntitulo');
	//ocultar_desc('mayor');
	document.frmprotocolares.mayorderecho.value = ""; 
	document.frmprotocolares.numero.value = "";    
	    }
	
	if(valor!="I"){
	ocultar_desc('ntitulo');
	//ocultar_desc('mayor');
	document.frmprotocolares.mayorderecho.value = ""; 
	document.frmprotocolares.numero.value = "";  
	  
    }

}

function estadorrpp2(valor)
{
    document.frmprotocolares.conestado2.value = valor;

	if(valor=="I"){
	mostrar_desc('ntitulo2');
	
	//document.frmprotocolares.mayorderecho2.value = ""; 
	document.frmprotocolares.numero2.value = "";    
	    }
	
	if(valor!="I"){
	ocultar_desc('ntitulo2');
	//document.frmprotocolares.mayorderecho2.value = ""; 
	document.frmprotocolares.numero2.value = "";  
	  
    }

}




function mostrarubigeoo(id,name)
    {
  document.frmprotocolares.ubigen.value = id;
  document.frmprotocolares.codubi.value = name;  
  ocultar_desc('buscaubi');     
        
    }
function mostrarubigeoos(id,name)
    {
  document.frmprotocolares.ubigens.value = id;
  document.frmprotocolares.codubis.value = name;   
  ocultar_desc('buscaubis');       
    }
function mostrarubigeoos2(id,name)
    {
  document.getElementById('ubigens2').value; 
  document.getElementById('codubis2').value;    
  ocultar_desc('buscaubis2');       
    }	
	
function mostrarubigeoosc(id,name)
    {
  document.frmprotocolares.ubigensc.value = id;
  document.frmprotocolares.codubisc.value = name;  
  ocultar_desc('buscaubisc');        
    }
	
function mostrarubigeoosc2(id,name)
    {
  document.frmprotocolares.ubigensc2.value = id;
  document.frmprotocolares.codubisc2.value = name;  
  ocultar_desc('buscaubisc2');        
    }
function mostrarubigeoosc3(id,name)
    {
  document.frmprotocolares.ubigensc3.value = id;
  document.frmprotocolares.codubisc3.value = name;  
  ocultar_desc('buscaubisc3');        
    }
	
function mostrarubigeoosc4(id,name)
    {
  document.frmprotocolares.ubigensc4.value = id;
  document.frmprotocolares.codubisc4.value = name;  
  ocultar_desc('buscaubisc4');        
    }	

function mostrarubigeoosc6(id,name)
    {
  document.frmprotocolares.ubigensc6.value = id;
  document.frmprotocolares.codubisc6.value = name;  
  ocultar_desc('buscaubisc6');        
    }
function mostrarubigeoosc7(id,name)
    {
  document.frmprotocolares.ubigensc7.value = id;
  document.frmprotocolares.codubisc7.value = name;  
  ocultar_desc('buscaubisc7');        
    }

function mostrarprofesioness(id,name)
    {
  document.frmprotocolares.idprofesion.value = id;
  document.frmprotocolares.nomprofesiones.value = name;  
  ocultar_desc('buscaprofe');        
    }
	
function mostrarcargoos(id,name)
    {
  document.frmprotocolares.idcargoo.value = id;
  document.frmprotocolares.nomcargoss.value = name;  
  ocultar_desc('buscacargooo');        
    }	
	
///////////////
function mostrarprofesioness2(id,name)
    {
  document.frmprotocolares.idprofesion2.value = id;
  document.frmprotocolares.nomprofesiones2.value = name;  
  ocultar_desc('buscaprofe2');        
    }
	
function mostrarcargoos2(id,name)
    {
  document.frmprotocolares.idcargoo2.value = id;
  document.frmprotocolares.nomcargoss2.value = name;  
  ocultar_desc('buscacargooo2');        
    }		
/////////////////////////////////////
function mostrarprofesioness3(id,name)
    {
  document.frmprotocolares.idprofesion3.value = id;
  document.frmprotocolares.nomprofesiones3.value = name;  
  ocultar_desc('buscaprofe3');        
    }
	
function mostrarcargoos3(id,name)
    {
  document.frmprotocolares.idcargoo3.value = id;
  document.frmprotocolares.nomcargoss3.value = name;  
  ocultar_desc('buscacargooo3');        
    }		
/////////////////////////////////////////
function mostrarprofesioness4(id,name)
    {
  document.frmprotocolares.idprofesion4.value = id;
  document.frmprotocolares.nomprofesiones4.value = name;  
  ocultar_desc('buscaprofe4');        
    }
	
function mostrarcargoos4(id,name)
    {
  document.frmprotocolares.idcargoo4.value = id;
  document.frmprotocolares.nomcargoss4.value = name;  
  ocultar_desc('buscacargooo4');        
    }	
//////////////////////////////
function mostrarprofesioness6(id,name)
    {
  document.frmprotocolares.idprofesion6.value = id;
  document.frmprotocolares.nomprofesiones6.value = name;  
  ocultar_desc('buscaprofe6');        
    }
	
function mostrarcargoos6(id,name)
    {
  document.frmprotocolares.idcargoo6.value = id;
  document.frmprotocolares.nomcargoss6.value = name;  
  ocultar_desc('buscacargooo6');        
    }		
//////////////////////////////
function mostrarprofesioness7(id,name)
    {
  document.frmprotocolares.idprofesion7.value = id;
  document.frmprotocolares.nomprofesiones7.value = name;  
  ocultar_desc('buscaprofe7');        
    }
	
function mostrarcargoos7(id,name)
    {
  document.frmprotocolares.idcargoo7.value = id;
  document.frmprotocolares.nomcargoss7.value = name;  
  ocultar_desc('buscacargooo7');        
    }		
	
function grabarfirmacontra()
{
grabarfirma();
ocultar_desc('firmasss');
document.frmprotocolares.fecfirmaa.value = "";
document.frmprotocolares.firmitaa.value = "";
}

function valida()
    {
        if(frmprotocolares.codactos.value==""){
        alert("Los campos de codigo de actos, contratos o tipos de kardex estan vacios o no han sido seleccionados, por favor ingresar datos");
        frmprotocolares.contrato.focus();
        retun
        }else{
		generakardex();
		mostrar_desc('tabsss');
		ocultar_desc('menuactos');
		}	
        
    }

function limpiarrpp()
    {  
//document.frmprotocolares.titulorp.value = "";
document.frmprotocolares.importee.value ="";
document.frmprotocolares.anotacion.value = "";
document.frmprotocolares.numeroo.value = "";
document.frmprotocolares.mayorderecho.value = "";
document.frmprotocolares.observa.value = "";
    }

function validar2()
    {  
      condiciones();
	   mostrar_desc('menucondicion');
    }
function validar2k()
    {  
       condicionesk();
	   mostrar_desc('menucondicionk');
    }

function grabareditarcontratante()
    {  
      grabareditarcontraaaa();
	  alert("Datos del Contratante Actualizados");
	  ocultar_desc('mantecontra');
	  mostrarcontratante();
    }

function mostraridcontratante(valor){
document.frmprotocolares.firmitaa.value = valor;
mostrar_desc('firmasss');
}

function valorreg(valor){
document.frmprotocolares.pre2.value = valor;
document.frmprotocolares.presu.value = valor;
document.frmprotocolares.saldo2.value = valor;
}

function valornot(valor){
document.frmprotocolares.pre1.value = valor;
document.frmprotocolares.saldo1.value = valor;

}
	
function validarformular(valor)
    {  
     mostrar_desc('preguntas');
	 document.frmprotocolares.idcontratantee.value = valor;
    }
	
function validar4()
	 {  
	    mostrar_desc('uifpdtparticip');
		mostraruifpdtparticipante()
    }	
	
function mostrar(isChecked, myValue)
{	
	total = document.frmprotocolares.contrato.value;
	separador=" / ";
	quitar=myValue + separador;
	nuevoStr="";
	if (isChecked) document.frmprotocolares.contrato.value = total + myValue + separador;

	else document.frmprotocolares.contrato.value = total.replace(quitar,nuevoStr);
}

function mostrarfirma(isChecked, myValue)
{ 
    total = document.frmprotocolares.firma.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.firma.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.firma.value = total.replace(total,remplazo);
}

function mostrarfirma2(isChecked, myValue)
{ 
    totalw = document.frmprotocolares.firmaa.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.firmaa.value = totalw.replace(totalw,"") + myValue;

	else document.frmprotocolares.firmaa.value = totalw.replace(totalw,remplazo);
}

function mostrarfirma3(isChecked, myValue)
{ 
    totalw = document.frmprotocolares.firmaa.value;
	remplazo="1";
	if (isChecked) document.frmprotocolares.firmaa.value = totalw.replace(totalw,"") + remplazo;

	else document.frmprotocolares.firmaa.value = totalw.replace(totalw,myValue);
}



function mostrarindice(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.indice.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.indice.value = total.replace(total,remplazo);
}

function mostrarindice2(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice2.value;
	remplazo="0";
	if (isChecked) document.frmprotocolares.indice2.value = total.replace(total,"") + myValue;

	else document.frmprotocolares.indice2.value = total.replace(total,remplazo);
}

function mostrarindice3(isChecked, myValue)
{ 
    total = document.frmprotocolares.indice2.value;
	remplazo="1";
	if (isChecked) document.frmprotocolares.indice2.value = total.replace(total,"") + remplazo;

	else document.frmprotocolares.indice2.value = total.replace(total,myValue);
}

function seleccioncontratanteeli(valor){
document.frmprotocolares.idcontra.value=valor;
}

function mostedi(){
mostrar_desc('mantecontra');
editcontra();


}


function mosteli(){
 mosteliminarc();
 alert("Contratante Eliminado");
 mostrarcontratante();
 ocultar_desc('clienedit');

}

function seleccionarcontra(valor) {

document.frmprotocolares.representaa.value=valor;
ocultar_desc('representante');
}

function seleccionarcontrac(valor) {

document.frmprotocolares.representaa2.value=valor;
ocultar_desc('representantee');
}

function buttons(valor) {
document.frmprotocolares.repre.value=valor;
ocultar_desc('representante');
document.frmprotocolares.representaa.value="";
document.frmprotocolares.facultades.value="";
}

function buttons23(valor) {
document.frmprotocolares.repre.value=valor;
mostrar_desc('representante');
mostrarcontrata();

}

function buttonsc(valor) {
document.frmprotocolares.repre2.value=valor;
ocultar_desc('representantee');
document.frmprotocolares.representaa2.value="";
document.frmprotocolares.facultadess.value="";

}
function buttons23c(valor) {
document.frmprotocolares.repre2.value=valor;
mostrar_desc('representantee');
mostrarcontratac();

}

//////////////// copiar esto a el original ultimitooooo
function cerrarr(){
	ocultar_desc('representantee');
	}
	
function editcontratante2(){
	
	verclientee2();
	mostrar_desc('editcontrata2');
	//alert('recontramosn');
	}	

function casadito3(valor)
{
   if(valor==2){
    mostrar_desc('casado3');
   }else{
    ocultar_desc('casado3');
   }
}

function mostrarcargooscnt(id,name)
    {
  document.frmprotocolares.idcargoocnt.value = id;
  document.frmprotocolares.nomcargosscnt.value = name;  
  ocultar_desc('buscacargooocnt');        
    }	
	
function mostrarprofesionesscnt(id,name)
    {
  document.frmprotocolares.idprofesioncnt.value = id;
  document.frmprotocolares.nomprofesionescnt.value = name;  
  ocultar_desc('buscaprofecnt');        
    }

function mostrarubigeoosccnt(id,name)
    {
  document.frmprotocolares.ubigensccnt.value = id;
  document.frmprotocolares.codubisccnt.value = name;  
  ocultar_desc('buscaubisccnt');        
    }

function hhhcnt()
    { 
	  mostrar_desc('conyugessscnt');
	 }	
	 
	
function ggcliecnt()
    {   
	   grabarclientecnt();
	   ocultar_desc('editcontrata2');
	   ocultar_desc('mantecontra');
	   alert("Contratante modificado satisfactoriamente");
    }
	
function ggclie6mm()
    {   
	   grabarcliente6mm();
	   ocultar_desc('conyugessscnt');
	   alert("Conyuge Cambiado satisfactoriamente");
    }
///////////////////////////////////////////

function newmove() {
mostrar_desc('newmrrpp');
}


function seleccionmov(valor, name) {
document.frmprotocolares.codmovreg.value=valor;
document.frmprotocolares.itemcodmovreg.value=name;
}


////////////////////////////////////////////////////////


////////////////////////////////////////////////

function validanewmovreg() 
{
   grabarnewmov();
   ocultar_desc('newmrrpp');

}

function validaeditmovreg()
{
 editarmovreg();
 ocultar_desc('editmrrpp');

}

function btngrabaremp(){
  grabarempresa();

}

function calcularrrpp() {
mostrar_desc('formurent');
}

function validarformul() {
mostrar_desc('formurent');
ocultar_desc('preguntas');
}

function grabar_renta() {
grabarrenta();

}

function grabarformulario() {
saveformulario();
document.frmprotocolares.numformu.value="";
document.frmprotocolares.monto.value="";
}

function formulita(valor) {
document.frmprotocolares.pregu1.value=valor;
calcularfrm();
}

function formulita1(valor) {
document.frmprotocolares.pregu2.value=valor;
calcularfrm();
}

function formulita2(valor) {
document.frmprotocolares.pregu3.value=valor;
calcularfrm();
}

function mostrar2(isChecked, name)
{
	total2 = document.frmprotocolares.codactos.value;
     quitar2=name;
	if (isChecked) document.frmprotocolares.codactos.value = total2 + name;

	else document.frmprotocolares.codactos.value = total2.replace(quitar2,"");
}

function mostrar3(isChecked, name, id)
{
	total3 = document.frmprotocolares.codcon.value;
	quitar3=name +"."+ id + "/";
	if (isChecked) document.frmprotocolares.codcon.value = total3 + name +"."+ id + "/";

	else document.frmprotocolares.codcon.value = total3.replace(quitar3,"");
}

function mostrarcon(isChecked, name, id)
{
	total4 = document.frmprotocolares.codconn.value;
	quitar4=name +"."+ id + "/";
	if (isChecked) document.frmprotocolares.codconn.value = total4 + name +"."+ id + "/";

	else document.frmprotocolares.codconn.value = total4.replace(quitar4,"");
}



function CompareDates(valor1,valor2,valor3)
{
    var str1 = valor1;
    var str2 = valor2;
	var str3 = valor3;
    var dt1  = parseInt(str1.substring(0,2),10);
    var mon1 = parseInt(str1.substring(3,5),10);
    var yr1  = parseInt(str1.substring(6,10),10);
    var dt2  = parseInt(str2.substring(0,2),10);
    var mon2 = parseInt(str2.substring(3,5),10);
    var yr2  = parseInt(str2.substring(6,10),10);
	 var dt3  = parseInt(str3.substring(0,2),10);
    var mon3 = parseInt(str3.substring(3,5),10);
    var yr3  = parseInt(str3.substring(6,10),10);
    var date1 = new Date(yr1, mon1, dt1);
    var date2 = new Date(yr2, mon2, dt2);
	var date3 = new Date(yr3, mon3, dt3);
	
	if (valor3!=""){
		if (date3<date1){
		alert("La fecha de Escrituracion no puede ser menor que la fecha de creacion del kardex");
		}else{
		  if(date2 < date3)
			{
				alert("La fecha no puede ser menor que la fecha de creacion del Kardex o Escrituracion");
				}
			else
			{
				grabarfirmacontra();
				
			}
		}
     }else{
	  
	   alert("Ingrese primero la fecha de Escrituracion");
	 }
}

function CompareDatesescritu(valor1,valor2)
{
	//a = document.getElementById('fechaescritura').value;
	//b = document.getElementById('fechaingreso').value;
	//valor2 = document.getElementById('fechaingreso');
    //alert('dsd');
	var str1 = valor1; 
    var str2 = valor2;
	var dt1  = parseInt(str1.substring(0,2),10);
    var mon1 = parseInt(str1.substring(3,5),10);
    var yr1  = parseInt(str1.substring(6,10),10);
    var dt2  = parseInt(str2.substring(0,2),10);
    var mon2 = parseInt(str2.substring(3,5),10);
    var yr2  = parseInt(str2.substring(6,10),10);
	
    var date1 = new Date(yr1, mon1, dt1);
    var date2 = new Date(yr2, mon2, dt2);

	if (valor2!=""){
		if (date2<date1){
		alert("La fecha de Escrituracion no puede ser menor que la fecha de creacion del kardex");
		document.frmprotocolares.fechaescritura.value="";
		
		}
     }
}


function callumbral(valor)
{
	document.frmprotocolares.idttiippooacto.value=valor;
	document.getElementById('tipactox').value = valor;
	mostrarumbral();
}
-->
function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
function cambiatipdoc()
{ 

	divResultado = document.getElementById('tipodocuR');
	//_id=document.frmprotocolares.tipodoc.value;
	
	var _id = document.getElementById('tipoper').value;
	
	ajax=objetoAjax();

	ajax.open("POST","combodocu.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {

			divResultado.innerHTML = ajax.responseText;
			document.getElementById('tipodoc').selectedIndex='1';
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("id="+_id)
	
}
function cambiatipdoc2()
{ 

	divResultado = document.getElementById('tipodocuR');
	//_id=document.frmprotocolares.tipodoc.value;
	
	var _id = document.getElementById('tipoper').value;
	
	ajax=objetoAjax();

	ajax.open("POST","combodocu2.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {

			divResultado.innerHTML = ajax.responseText;
			document.getElementById('tipodoc').selectedIndex='1';
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("id="+_id)
	
}

function selectdocu(_eval)
{
//	var _eval = document.getElementById('tipoper').value;
	
	if(_eval=='J')
	{ 
		cambiatipdoc();
	}
	else if(_eval=='N')
	{cambiatipdoc2();}
	
}

// #= valida ingreso de DNI y RUC
function validaDNIRUC()
{
var _docu = document.getElementById('numdoc');	
var _tipdoc = document.getElementById('tipodoc');

if(_tipdoc.value=='1')
{ 
	_docu.setAttribute('maxlength','8');
	if(_docu.value.length < 8)
	{alert('El D.N.I. debe tener 8 dígitos');return false;}
	else {return true;}
}
if(_tipdoc.value=='8')
{
	if(_docu.value.length < 11)
	{alert('El R.U.C. debe tener 11 dígitos');return false;}
	else {return true;}
}

}
// #= fin valida 
function evalDocumento()
{
	if(validaDNIRUC()==true){
	buscaclientes();limpiconyuge();
	}	
}
//############################
function evallenght()
{
var _docu = document.getElementById('numdoc');	
var _tipdoc = document.getElementById('tipodoc');

if(_tipdoc.value=='1')
{ 
	_docu.setAttribute('maxlength','8');

}
if(_tipdoc.value!='1')
{
  _docu.setAttribute('maxlength','11');
}

}
// #############################

function aumenta2() 
	  {
  		var num = 30;//document.getElementById('txtplazo').value; 
  		var f = document.getElementById('fechamov').value; 
		
  		f = f.split('/'); 
  		f = f[1]+'/'+f[0]+'/'+f[2];  
 		hoy = new Date(f); 
 	    hoy.setTime(hoy.getTime()+num*24*60*60*1000); 
  		mes = hoy.getMonth()+1; 
  		if(mes<9) { mes='0'+mes; }
  		fecha = hoy.getDate()+'/'+mes+'/'+hoy.getFullYear(); 
				document.getElementById('vencimiento').value = fecha;
				//document.getElementById('Grabar').focus();
	  }

// Para limpiar datos de divs
//vpago:
function refreshvpago()
{
	validarpago();
	vertipoactopat();
	document.getElementById('nnminuta').value='';
	document.getElementById('imptrans').value='';
	document.getElementById('tipcambio').value='';
	//document.getElementById('newpagoo').style.display="none";			
}

//vpago:
function refreshnewbiennnes()
{
	//validarpago();
	document.getElementById('ubigens').value='';
	document.getElementById('codubis').value='';
	document.getElementById('fechaconst').value='';
	//document.getElementById('newpagoo').style.display="none";			
}

function editclie(_itemmp,_idtipacto)
{ 
	document.getElementById('tipactox').value = _idtipacto;
	
	//muestra la lista de bienes
	ocultar_desc('newbiennnes');
	listarbienesss();

		
}

//////////////////////////////
<!---  --->

function grabarclientecnt()
{
	//donde se mostrará el resultado
	divResultado = document.getElementById('tredfdfdf');
	//tomamos el valor de la lista desplegable
	
	numdoccnt=document.frmprotocolares.numdoccnt.value;
	apepatcnt=document.frmprotocolares.apepatcnt.value;
	apematcnt=document.frmprotocolares.apematcnt.value;
	prinomcnt=document.frmprotocolares.prinomcnt.value;
	segnomcnt=document.frmprotocolares.segnomcnt.value;
	direccioncnt=document.frmprotocolares.direccioncnt.value;
	emailcnt=document.frmprotocolares.emailcnt.value;
	telfijocnt=document.frmprotocolares.telfijocnt.value;
	telcelcnt=document.frmprotocolares.telcelcnt.value;
	teloficnt=document.frmprotocolares.teloficnt.value;
	sexocnt=document.frmprotocolares.sexocnt.value;
	idestcivilcnt=document.frmprotocolares.idestcivilcnt.value;
	nacionalidadcnt=document.frmprotocolares.nacionalidadcnt.value;
	idprofesioncnt=document.frmprotocolares.idprofesioncnt.value;
	idcargoocnt=document.frmprotocolares.idcargoocnt.value;
	cumpcliecnt=document.frmprotocolares.cumpcliecnt.value;
	natpercnt=document.frmprotocolares.natpercnt.value;
	codubisccnt=document.frmprotocolares.codubisccnt.value;
	nomprofesionescnt=document.frmprotocolares.nomprofesionescnt.value;
	nomcargosscnt=document.frmprotocolares.nomcargosscnt.value;
	ubigensccnt=document.frmprotocolares.ubigensccnt.value;
	residentecnt=document.frmprotocolares.residentecnt.value;
	docpaisemicnt=document.frmprotocolares.docpaisemicnt.value;
	codcliecnt=document.frmprotocolares.codcliecnt.value;	
	cconyugecnt=document.frmprotocolares.cconyugecnt.value;	
	//instanciamos el objetoAjax
	ajax=objetoAjax();
	//usamos el medoto POST
	//archivo que realizará la operacion
	//datoscliente.php
	ajax.open("POST","grabar_clientecnt.php",true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4 && ajax.status==200) {
			//mostrar resultados en esta capa
			divResultado.innerHTML = ajax.responseText;
		}
	}
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	//enviando los valores
	ajax.send("&numdoccnt="+numdoccnt+"&apepatcnt="+apepatcnt+"&apematcnt="+apematcnt+"&prinomcnt="+prinomcnt+"&segnomcnt="+segnomcnt+"&direccioncnt="+direccioncnt+"&emailcnt="+emailcnt+"&telfijocnt="+telfijocnt+"&telcelcnt="+telcelcnt+"&teloficnt="+teloficnt+"&sexocnt="+sexocnt+"&idestcivilcnt="+idestcivilcnt+"&nacionalidadcnt="+nacionalidadcnt+"&idprofesioncnt="+idprofesioncnt+"&idcargoocnt="+idcargoocnt+"&cumpcliecnt="+cumpcliecnt+"&natpercnt="+natpercnt+"&codubisccnt="+codubisccnt+"&nomprofesionescnt="+nomprofesionescnt+"&nomcargosscnt="+nomcargosscnt+"&ubigensccnt="+ubigensccnt+"&residentecnt="+residentecnt+"&docpaisemicnt="+docpaisemicnt+"&codcliecnt="+codcliecnt+"&cconyugecnt="+cconyugecnt)
	
}

<!---  --->
</script>
 

<style type="text/css">
<!--
.submenutitu {
	font-family: Calibri;
	font-size: 18px;
	font-style: italic;
	color:#FF9900;
}
.titubusca {
	font-family: Calibri;
	font-size: 13px;
	color: #333333;
	font-style: italic;
}
-->
</style>
<style type="text/css">
<!--
#gridPatrimonial{
	width:100px;
	height:200px;}

.camposss {font-family: Calibri; font-style: italic; font-size: 14px; color: #333333; }


ul.tabs {margin: 0;  padding: 0;  float: left;  list-style: none;  height: auto;  width: 760px; border-left:2px solid #264965; border-bottom:2px solid #777; }
ul.tabs li { background:#264965; font-family:Calibri; color:#FF9900; float: left;  margin-left: 0px;  padding: 0; border: 2px solid #777; overflow: hidden; position: relative; border-left:0px; margin-bottom:-2px;}
ul.tabs li a {text-decoration: none; font-family:Calibri; color:#FF9900; background:#264965; display: block; font-size: 14px; font-weight:bold; padding: 4px 20px; }
ul.tabs li a:hover {background:#FF9900; font-family:Calibri; color:#264965}
ul.tabs li.active, html ul.tabs li.active a:hover  {background:#FF9900; border-bottom: 2px solid #eee; margin-bottom:-2px;}
 
.Contenedor{border: 2px solid #777; border-top: none; overflow: hidden; clear: both; float: left; width: 760px; background: #ffff;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
.Contenido {padding: 15px; font-size: 12px;}
-->

<style type="text/css">
<!--

.slectcontratantes {
	font-family: Calibri;
	font-size: 12px;
	color: #FFFFFF;
}

div.representante {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:638px;
	height:220px;
	position:absolute;
	left: 549px;
	top: 180px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}

div.allcontrata {width:600px; height:150px; overflow:auto;}
div.newproto
{ 
background-color: #ffffff;
border: 4px solid #264965;  
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;
width:820px; height:750px;
}


div.buscar{ width:620px; height:420px;
 background-color: #264965;
border: 4px solid #264965;
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;  }

div.mante{ width:310px; height:420px;
background-color: #264965;
border: 4px solid #264965;
-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;  }

div.contratantes{ width:728px; height:250px; overflow:auto;  }

.editcampp {font-family: Calibri; font-style: italic; font-size: 14px; color: #FFFFFF; }

.titulomenuacto { font-family:Calibri; color:#FFFFFF; font-size:14px; font-style:italic;
}

div.tipoacto{ width:740px; height:150px; overflow:auto;}
div.newproto1 {  background-color: #ffffff;
border: 4px solid #264965;  

-moz-border-radius: 13px;
-webkit-border-radius: 13px;
border-radius: 13px;
-moz-box-shadow: 0px 0px 5px #000000;
-webkit-box-shadow: 0px 0px 5px #000000;
box-shadow: 0px 0px 5px #000000;
width:800px; height:600px;
}
.kardex{ font-family:Calibri; font-size:24px; font-style:italic; color:#003366}
div.menucondicion{
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:750px;
	height:220px;
	position:absolute;
	left: 460px;
	top: 95px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}

div.clienedit {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 494px;
	top: 274px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.uifpdtparticip{
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 491px;
	top: 333px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}

div.menuactos {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:220px;
	position:absolute;
	left: 490px;
	top: 179px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos2 {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:759px;
	height:220px;
	position:absolute;
	left: 482px;
	top: 172px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.asigna{ height:220px; width:728px; overflow:auto;


}
div.tipoacto2 {width:740px; height:150px; overflow:auto;}
div.clienbus {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 493px;
	top: 270px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
.Estilo15 {font-size: 12px; font-weight: bold; font-family: Calibri;}
.Estilo18 {font-family: Calibri; font-weight: bold; }
.Estilo21 {font-family: Calibri; color: #003399; }
.Estilo23 {font-family: Calibri; color: #003399; font-weight: bold; }
.Estilo31 {font-family: Calibri; font-size: 13px; font-style: italic; }
.style1 {
	font-size: 14px;
	font-weight: bold;
}
.style2 {
	font-family: Calibri;
	font-size: 14px;
	font-style: italic;
	font-weight: bold;
}
.Estilo40 {font-family: Calibri; color: #666666; }
.Estilo42 {font-family: Calibri; font-style: italic; font-size: 14px; color: #333333; font-weight: bold; }
.btnpatrimonial {color: #FFFFFF; font-family: Calibri; font-style: italic; font-weight: bold; }
.titupatrimo {font-size: 12; font-style: italic; font-family: Calibri;}
.Estilo43 {color: #333333}
.Contenedor1 {border: 2px solid #777; border-top: none; overflow: hidden; clear: both; float: left; width: 760px; background: #ffff;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
div.clienbus1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 493px;
	top: 270px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.clienedit1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 494px;
	top: 274px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos1 {
	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:220px;
	position:absolute;
	left: 489px;
	top: 182px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.menuactos21 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:759px;
	height:220px;
	position:absolute;
	left: 482px;
	top: 172px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=50)"; /* expected to work in IE 8 */
	filter: alpha(opacity=50);   /* IE 4-7 */
	zoom: 1;
}
div.uifpdtparticip1 {	background:#333333;
	border: 1px solid #333333;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 7px #000000;
	-webkit-box-shadow: 0px 0px 7px #000000;
	box-shadow: 0px 0px 7px #000000;
	width:760px;
	height:299px;
	position:absolute;
	left: 491px;
	top: 333px;
	margin-top: 15px;
	margin-left: -450px;
	opacity: 0.95;
	filter: "alpha(opacity=70)"; /* expected to work in IE 8 */
	filter: alpha(opacity=70);   /* IE 4-7 */
	zoom: 1;
}
-->
</style>
</head>

<body onLoad="aumenta2();">
<div class="newproto" id="newproto">
<input name="tipactox" type="hidden" id="tipactox" />
  <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><form id="frmprotocolares" name="frmprotocolares" method="post" action="actualizar_kardex.php">
          <table width="820" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="36" height="28" align="center" bgcolor="#264965"><img src="iconos/nuevo2.png" width="20" height="22" /></td>
              <td width="745" bgcolor="#264965"><span class="submenutitu">Nuevo Kardex</span></td>
            </tr>
            <tr>
              <td colspan="2"><table width="757" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="246" height="26" valign="bottom"><span class="camposss">Tipo de Kardex : </span></td>
                    <td width="117" height="26" valign="bottom"><span class="camposss">Fecha de Ingreso</span></td>
                    <td height="26" colspan="2" align="left" valign="bottom" class="camposss">&nbsp;</td>
                    <td width="143" rowspan="3" align="center" valign="middle"><div id="resultado" style="width:100px;"><a href='#' onClick="valida()"><img src='imagenes/generar.jpg' alt="" width='95' height='29' border='0' title='Editar Usuario' /></a></div></td>
                  </tr>
                  <tr>
                    <td height="31"><select name="idtipkar" id="idtipkar" onChange="cambiar()">
                      <option value="0">SELECCIONE TIPO KARDEX</option>
                        
                        <?php
		 while($row=mysql_fetch_array($sql)){
		  echo "<option value = ".$row["idtipkar"].">".nl2br($row["nomtipkar"])."</option>";  
		  }
		?>
                    </select></td>
                    <td height="31"><input type="text" readonly="readonly" name="fechaingreso" id="fechaingreso"  size="18" value="<?php echo date("d/m/Y"); ?>"  /></td>
                    <td width="103" align="center" valign="middle"><label>
                      <input name="horaingreso" readonly="readonly" type="hidden" value="<?php echo $horaingreso; ?>" id="horaingreso" size="15" />
                    </label></td>
                    <td width="157" height="31" align="right" class="kardex">Nº Kardex:</td>
                  </tr>
                  <tr>
                    <td height="28" colspan="4" valign="bottom"><table width="601" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="75" height="27"><span class="camposss">Referencia :</span></td>
                          <td width="526"><input name="referencia" style="text-transform:uppercase" type="text" id="referencia" size="80" /></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="28" colspan="5"><table width="697" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="96"><span class="camposss">Codigo de  Actos
                            <label></label>
                          </span></td>
                          <td width="72"><span class="camposss">
                            <input name="codactos" readonly="readonly"  type="text" id="codactos" size="12" style="background:#B8E7DF"  />
                          </span></td>
                          <td width="161" align="right" class="camposss">Derecho Notarial :</td>
                          <td width="109"><label>
                            <input name="dnotarial" type="text" id="dnotarial" size="10" onChange="valornot(this.value)"   />
                          </label></td>
                          <td width="113" align="right" class="camposss">Derecho Registral :</td>
                          <td width="146"><input name="dregistral" type="text" id="dregistral" size="10" onChange="valorreg(this.value)" /></td>
                        </tr>
                      </table>
                        <label></label></td>
                  </tr>
                  <tr>
                    <td height="14" colspan="5" class="camposss"><table width="765" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="97">Contrato</td>
                          <td width="689"><table width="682" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="506" height="27"><label>
                                  <input name="contrato" type="text" id="contrato" style="text-transform:uppercase" size="80" />
                                  </label>                                </td>
                                <td width="84"><a onClick="asi3()"><img src="iconos/addacto.png" width="75" height="29" /></a>
                                    <div id="menuactos" class="menuactos1" style="display:none; z-index:2;" >
                                      <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="29" colspan="2" class="style30"><table width="196" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="16">&nbsp;</td>
                                                <td width="180"><span class="titulomenuacto">Seleccione Acto(s)</span></td>
                                              </tr>
                                          </table></td>
                                          <td width="21" align="right" valign="middle">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="50" colspan="3"><div id="tipoacto" class="tipoacto"></div></td>
                                        </tr>
                                        <tr>
                                          <td width="607" height="10">&nbsp;</td>
                                          <td width="132"><a href='#' onClick="ocultar_desc('menuactos')"><img src="iconos/aceptar.png" width="95" height="29" border="0" /></a></td>
                                          <td height="10">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="3" align="center" valign="middle"></td>
                                        </tr>
                                        <tr></tr>
                                      </table>
                                  </div></td>
                                <td width="92"><a onClick="asi4()"><img src="iconos/delacto.png" width="75" height="29" /></a>
                                    <div id="menuactos2" class="menuactos21" style="display:none; z-index:3;" >
                                      <table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="29" colspan="2" class="style30"><table width="196" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="16">&nbsp;</td>
                                                <td width="180"><span class="titulomenuacto">Quitar Acto(s)</span></td>
                                              </tr>
                                          </table></td>
                                          <td width="21" align="right" valign="middle">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="50" colspan="3"><div id="tipoacto2" class="tipoacto2"></div></td>
                                        </tr>
                                        <tr>
                                          <td width="607" height="10">&nbsp;</td>
                                          <td width="132"><a href='#' onClick="ocultar_desc('menuactos2')"><img src="iconos/aceptar.png" width="95" height="29" border="0" /></a></td>
                                          <td height="10">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="3" align="center" valign="middle"></td>
                                        </tr>
                                        <tr></tr>
                                      </table>
                                    </div></td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="32" colspan="5"> ------------------------------------------------------------------------------------------------------------------------------</td>
                  </tr>
                  <tr>
                    <td height="14" colspan="5">
<!---------------------------aqui copiar al original --------------------------------------------------->
                    
                    <div id="editcontrata2" style="position:absolute; display:none; width:662px; height:275px; left: 87px; top: 362px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="659" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="614"><span class="camposss">Editar Contratante</span></td>
      <td width="21"><a href="#" onClick="ocultar_desc('editcontrata2')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="verclienterctm2" style="width:618px; height:220px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>

<div id="buscacargooocnt" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooocnt')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargoosscnt" type="text" id="buscacargoosscnt"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitosscnt()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargitocnt" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>

<div id="buscaprofecnt" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofecnt')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofescnt" type="text" id="buscaprofescnt"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesionescnt()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesionescnt" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
             
<!------------------------------------------------------------------------------------------------------->
                    <div id="editaclie" style="position:absolute; display:none; width:662px; height:275px; left: 87px; top: 362px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="659" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="614"><span class="camposss">Editar Cliente</span></td>
      <td width="21"><a href="#" onClick="ocultar_desc('editaclie')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="verclienterctm" style="width:618px; height:220px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="conyugessscnt" style="position:absolute; display:none; width:662px; height:307px; left: 89px; top: 351px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="659" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="13" height="29">&nbsp;</td>
      <td width="130"><span class="Estilo42">Cambiar Conyuge </span></td>
      <td width="206" align="right" class="camposss">N° D.N.I. :</td>
      <td width="143"><input name="numdoccnt" type="text" id="numdoccnt" style="background:#FFFFFF" size="20" maxlength="15"  /></td>
      <td width="144"><a  onclick="buscaclientescnt()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a></td>
      <td width="23"><a href="#" onClick="ocultar_desc('conyugessscnt')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td colspan="4"><div id="nuevaconyugecnt" style="width:618px; height:220px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="4">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="conyugesss2" style="position:absolute; display:none; width:662px; height:307px; left: 89px; top: 351px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="659" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="13" height="29">&nbsp;</td>
      <td width="130"><span class="Estilo42">Cambiar Conyuge </span></td>
      <td width="206" align="right" class="camposss">N° D.N.I. :</td>
      <td width="143"><input name="numdoc6" type="text" id="numdoc6" style="background:#FFFFFF" size="20" maxlength="8" onKeyPress="buscaclientes6()" /></td>
      <td width="144"><a  onclick="buscaclientes6()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a></td>
      <td width="23"><a href="#" onClick="ocultar_desc('conyugesss2')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td colspan="4"><div id="nuevaconyuge2" style="width:618px; height:220px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="4">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="conyugesss" style="position:absolute; display:none; width:662px; height:307px; left: 89px; top: 351px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="659" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="13" height="29">&nbsp;</td>
      <td width="130"><span class="Estilo42">Ingresar Conyuge </span></td>
      <td width="206" align="right" class="camposss">N° D.N.I. :</td>
      <td width="143"><input name="numdoc2" type="text" id="numdoc2" style="background:#FFFFFF" size="20" maxlength="8" onKeyPress="buscaclientes2()" /></td>
      <td width="144"><a  onclick="buscaclientes2()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a></td>
      <td width="23"><a href="#" onClick="ocultar_desc('conyugesss')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td colspan="4"><div id="nuevaconyuge" style="width:618px; height:220px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="4">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
                    <div id="buscacargooo" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss" type="text" id="buscacargooss"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscacargooo7" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo7')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss7" type="text" id="buscacargooss7"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss7()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito7" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscacargooo6" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo6')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss6" type="text" id="buscacargooss6"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss6()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito6" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscacargooo4" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo4')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss4" type="text" id="buscacargooss4"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss4()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito4" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscacargooo3" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo3')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss3" type="text" id="buscacargooss3"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss3()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito3" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>

 <div id="buscacargooo2" style="position:absolute; display:none; width:637px; height:223px; left: 111px; top: 406px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Cargo:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscacargooo2')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscacargooss2" type="text" id="buscacargooss2"  style="background:#FFFFFF;" size="50" onKeyPress="buscacarguitoss2()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulcargito2" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscaprofe" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes" type="text" id="buscaprofes"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscaprofe7" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe7')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes7" type="text" id="buscaprofes7"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones7()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones7" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscaprofe6" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe6')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes6" type="text" id="buscaprofes6"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones6()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones6" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscaprofe4" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe4')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes4" type="text" id="buscaprofes4"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones4()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones4" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
<div id="buscaprofe3" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe3')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes3" type="text" id="buscaprofes3"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones3()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones3" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>

 <div id="buscaprofe2" style="position:absolute; display:none; width:637px; height:223px; left: 97px; top: 404px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="637" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="24" height="29">&nbsp;</td>
      <td width="585"><span class="camposss">Seleccionar Profesión:</span></td>
      <td width="28"><a href="#" onClick="ocultar_desc('buscaprofe2')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input name="buscaprofes2" type="text" id="buscaprofes2"  style="background:#FFFFFF;" size="50" onKeyPress="buscaprofesiones2()" />
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div id="resulprofesiones2" style="width:585px; height:150px; overflow:auto"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
                    <div id="firmasss" style="position:absolute; display:none; width:247px; height:91px; left: 410px; top: 389px; z-index:15; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                        <table width="241" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="16" height="24">&nbsp;</td>
                            <td width="193" class="camposss">Fecha Firma:</td>
                            <td width="32"><a href="#" onClick="ocultar_desc('firmasss')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                          </tr>
                          <tr>
                            <td rowspan="2">&nbsp;</td>
                            <td height="30" colspan="2"><label>
                            <input name="fecfirmaa" type="text" class="tcal" id="fecfirmaa" size="20"  />
                            <input name="firmitaa" type="hidden" id="firmitaa" size="10" />
                            <input name="detmpx" type="hidden" id="detmpx" size="10" />
                            
                            </label></td>
                          </tr>
                          <tr>
                            <td colspan="2"><a href="#" onClick="CompareDates(frmprotocolares.fechaingreso.value,frmprotocolares.fecfirmaa.value,frmprotocolares.fechaescritura.value)"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                          </tr>
                        </table>
                    </div>
                        <div id="patrimoniallll" style="position:absolute; display:none; width:745px; height:415px; left: 51px; top: 327px; z-index:17; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="743" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="11" height="25">&nbsp;</td>
                              <td width="697"><img src="iconos/patri.png" width="300" height="25" border="0" usemap="#Map" /></td>
                              <td width="32"><a href="#" onClick="ocultar_desc('patrimoniallll')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><div id="newpatrimonio" style="display:none">
                                <table width="718" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333">
                                    <tr>
                                      <td width="236" height="35" align="center" bgcolor="#666666"><a onClick="validarpago()"><span class="btnpatrimonial">Medio de Pago</span></a></td>
                                      <td width="215" align="center" bgcolor="#666666"><a onClick="validarbien()"><span class="btnpatrimonial">Información del Bien</span></a></td>
                                      <td width="259" align="center" bgcolor="#666666"><a onClick="validaruif()"><span class="btnpatrimonial">Información SAT/UIF</span></a></td>
                                    </tr>
                                    <tr>
                                      <td height="312" colspan="3" valign="top"><div id="vuif" style="display:none">
                                          <table width="680" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="24" height="30">&nbsp;</td>
                                              <td width="125"><span class="titupatrimo">Partida Registral</span></td>
                                              <td width="224" height="30"><span class="titupatrimo">
                                                <input name="pregis" style="background:#FFFFFF" type="text" id="pregis" size="20" />
                                              </span></td>
                                              <td height="30" class="titupatrimo">Forma de Pago</td>
                                            <td height="30"><span class="titupatrimo">
                                              <select name="fpago" id="fpago">
                                                <option value="C">CONTADO</option>
                                                <option value="P">PLAZO</option>
                                              </select>
                                            </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30">&nbsp;</td>
                                              <td height="30"><span class="titupatrimo">Sede Registral</span></td>
                                              <td height="30"><span class="titupatrimo">
                                                <select name="idsedereg2" id="idsedereg2">
                                                  <?php
	       while($rowsedess = mysql_fetch_array($sqlsedess)){
	         echo "<option value=".$rowsedess['idsedereg'].">".$rowsedess['dessede']."</option> \n";
             }
	     ?>
                                                </select>
                                              </span></td>
                                              <td width="116" height="30"><span class="titupatrimo">Origen de Fondos</span></td>
                                              <td width="191" height="30"><span class="titupatrimo">
                                                <input name="ofpago" style="background:#FFFFFF" type="text" id="ofpago" size="20" />
                                              </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30" rowspan="2" class="titupatrimo">&nbsp;</td>
                                              <td height="30" class="titupatrimo">Oport. de Pago</td>
                                              <td height="30"><span class="titupatrimo">
                                                <label></label>
                                                </span><span class="titupatrimo">
                                                <select name="oporpago" id="oporpago">
                                                  <?php
	       while($rowopor = mysql_fetch_array($sqloporpago)){

	         echo "<option value=".$rowopor['idoppago'].">".$rowopor['desoppago']."</option> \n";
             }
	     ?>
                                                </select>
                                              </span></td>
                                              <td height="30">&nbsp;</td>
                                              <td height="30"><span class="titupatrimo">
                                                <label></label>
                                              </span></td>
                                            </tr>
                                            <tr>
                                              <td height="30" class="titupatrimo">&nbsp;</td>
                                              <td height="30"><span class="titupatrimo">
                                                <input name="nregis" style="background:#FFFFFF" type="hidden" id="nregis" size="20" />
                                              </span></td>
                                              <td height="30">&nbsp;</td>
                                              <td height="30"><div id="gbruifp" style="display:;"><a href="#" onClick="grabaruifp()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div>
                                                  <div id="edituifp" style="display:none;"><a href="#" onClick="editarruifp()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div></td>
                                            </tr>
                                          </table>
                                      </div>
                                        <div id="vpago" style="display:">
                                            <table width="700" border="0" cellspacing="0" cellpadding="0">
                                            <tr><td><a href="#" onClick="refreshvpago();">Nuevo</a>&nbsp;&nbsp;<a href="#" onClick="listavpago();">Listar</a></td></tr>
                                              <tr>
                                                <td><table width="705" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td height="19">&nbsp;</td>
                                                      <td width="131" height="19">&nbsp;</td>
                                                      <td width="270" height="19"><label>
                                                        <input type="hidden" name="idttiippooacto" id="idttiippooacto" />
                                                      </label></td>
                                                      <td width="113" height="19"><div id="cumbral"></div></td>
                                                      <td width="176" height="19">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                      <td height="19">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Tipo de Acto:</span></td>
                                                      <td height="30"><div id="tpacto" style="display:"></div></td>
                                                      <td height="30" class="titupatrimo">Fecha Minuta</td>
                                                      <td height="30"><label>
                                                        <input name="nnminuta" type="text" style="background:#B8E7DF" class="tcal" id="nnminuta" size="20" />
                                                      </label></td>
                                                    </tr>
                                                    <tr>
                                                      <td width="15" height="30">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Importe de laTransaccion:</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <input name="imptrans" style="background:#B8E7DF" type="text" id="imptrans" size="20" />
                                                      </span></td>
                                                      <td height="30"><span class="titupatrimo">Tipo Moneda</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <select name="tipomoneda" id="tipomoneda">
                                                          <?php
	       while($rowmoneda = mysql_fetch_array($sqlmon)){

	         echo "<option value=".$rowmoneda['idmon'].">".$rowmoneda['desmon']."</option> \n";
             }
	     ?>
                                                        </select>
                                                      </span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30">&nbsp;</td>
                                                      <td height="30" align="center"><span class="titupatrimo">Exhibio medio de pago</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <label></label>
                                                        <select name="exibio" id="exibio" onChange="vermedio(this.value)">
                                                          <option value="SI">SI</option>
                                                          <option value="NO" selected="selected">NO</option>
                                                        </select>
                                                      </span></td>
                                                      <td height="30"><span class="titupatrimo">Tipo de Cambio</span></td>
                                                      <td height="30"><span class="titupatrimo">
                                                        <input name="tipcambio" style="background:#FFFFFF" type="text" id="tipcambio" size="20" />
                                                      </span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30" rowspan="2">&nbsp;</td>
                                                      <td height="30" align="center">&nbsp;</td>
                                                      <td height="30"><div id="ittmp"></div></td>
                                                      <td height="30">&nbsp;</td>
                                                      <td height="0"><div id="gbrmp" style="display:"><a href="#" onClick="grabarmediopago()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></div>
                                                          <div id="editmp" style="display:none"><a href="#" onClick="editarmediopago()"><img src="iconos/grabarmodi.png" width="94" height="29" border="0" /></a></div></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="30" colspan="5"><div id="newpagoo" style="display:none;">
                                                          <table width="671" border="0" align="center" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                              <td width="101" height="34"><a href="#" onClick="mmmppp()"><img src="iconos/neww2.png" width="94" height="29" border="0" /></a></td>
                                                              <td width="570"><a href="#" onClick="mostrar_desc('listmedpago');ocultar_desc('regmedpago')"><img src="iconos/neww3.png" width="94" height="29" border="0" /></a></td>
                                                            </tr>
                                                            <tr>
                                            <td colspan="2"><div id="regmedpago" style="display:none; border: #003366 solid 1px; background-color:#CCCCCC; position:absolute; width: 729px; left: 5px; top: 224px; height: 189px;">
                                                      <table width="726" border="0" cellspacing="0" cellpadding="0">
                                                            <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30" colspan="3" class="Estilo23 Estilo43">Nuevo Medio de Pago</td>
                                                                      <td height="30"><table width="200" border="0" cellpadding="0" cellspacing="0">
                                                                  <tr>
                                                                            <td width="176">&nbsp;</td>
                                                                            <td width="24"><a href="#" onClick="ocultar_desc('regmedpago')"><img src="iconos/cerrar.png" alt="" width="21" height="20" border="0" /></a></td>
                                                                        </tr>
                                                                      </table></td>
                                                                </tr>
                                                                    <tr>
                                                                      <td width="15">&nbsp;</td>
                                                                      <td width="116" height="30"><span class="titupatrimo">Medio de Pago</span></td>
                                                                      <td width="270" height="30"><select name="mediopago" id="mediopago">
                                                                          <?php
	       while($rowtpago = mysql_fetch_array($sqltpago)){

	         echo "<option value=".$rowtpago['codmepag'].">".$rowtpago['desmpagos']."</option> \n";
             }
	     ?>
                                                                        </select>                                                                      </td>
                                                                      <td width="119" height="30"><span class="titupatrimo">Importe Medio de Pago</span></td>
                                                                      <td width="206" height="30"><span class="titupatrimo">
                                                                    <label></label>
                                                                        <input name="impmediopago" style="background:#FFFFFF" type="text" id="impmediopago" size="20" />
                                                                      </span></td>
                                                                </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Entidad Financiera</span></td>
                                                                      <td height="30"><select name="entidadfinanciera" id="entidadfinanciera">
                                                                        <?php
	       while($rowbanco = mysql_fetch_array($sqlbancos)){

	         echo "<option value=".$rowbanco['idbancos'].">".$rowbanco['desbanco']."</option> \n";
             }
	     ?>
                                                                      </select></td>
                                                                      <td height="30" class="titupatrimo">Fecha de Operación</td>
                                                                      <td height="30"><label><span class="titupatrimo">
                                                                      <input name="fechaoperacion" style="background:#FFFFFF" type="text" id="fechaoperacion" class="tcal" size="20" />
                                                                      </span></label></td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Tipo Moneda</span></td>
                                                                    <td height="30"><select name="select" id="select">
                                                                      <option value="S">SOLES</option>
                                                                      <option value="D">DOLARES</option>
                                                                    </select></td>
                                                                      <td height="30">&nbsp;</td>
                                                                      <td height="30">&nbsp;</td>
                                                                    </tr>
                                                                    <tr>
                                                                      <td>&nbsp;</td>
                                                                      <td height="30"><span class="titupatrimo">Documentos</span></td>
                                                                      <td height="30" colspan="2"><span class="titupatrimo">
                                                                        <input name="documentos" style="background:#FFFFFF" type="text" id="documentos" size="50" />
                                                                      </span></td>
                                                                      <td height="30"><span class="titupatrimo"><a href="#" onClick="newgbrmp()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></span></td>
                                                                    </tr>
                                                              </table>
                                                              </div>
                                                            <div id="listmedpago" style="display:none; width:680px; height:100px; overflow:auto;"></div>
                                                            <!-- DIV ACTUALIZAR MEDIO DE PAGO -->
                                                            <div id="vermediopagoedit" style="display:none; border: #003366 solid 1px; background-color:#CCCCCC; position:absolute; width: 729px; left: 5px; top: 224px; height: 189px;"></div>
                                                           
                                                            </td>
                                                            </tr>
                                                          </table>
                                                      </div></td>
                                                    </tr>
                                                </table></td>
                                              </tr>
                                              <tr>
                                                <td>&nbsp;</td>
                                              </tr>
                                            </table>
                                        </div>
                                        <div id="vbien" style="display:none">
                                            <table width="710" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="18">&nbsp;</td>
                                                <td width="692"><img src="iconos/biennes.png" alt="" width="181" height="25" border="0" usemap="#Map2" /></td>
                                              </tr>
                                              <tr>
                                                <td>&nbsp;</td>
                                                <td><div id="newbiennnes" style="display:none">
                                                  <table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
                                                      <tr>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                        <td height="19">&nbsp;</td>
                                                      </tr>
                                                      <tr>
                                                        <td width="135" height="30"><span class="titupatrimo">Tipo</span></td>
                                                        <td width="208" height="30"><span class="titupatrimo">
                                                          <label></label>
                                                          <label>
                                                          <select name="tipob" id="tipob">
                                                            <option value="BIENES">BIENES</option>
                                                            <option value="ACCIONES Y DERECHOS">ACCIONES Y DERECHOS</option>
                                                          </select>
                                                          </label>
                                                        </span></td>
                                                        <td width="118" height="30">&nbsp;</td>
                                                        <td width="219" height="30"><span class="titupatrimo">
                                                          <label></label>
                                                        </span></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="30"><span class="titupatrimo">Bien-Acto Jurídico</span></td>
                                                        <td height="30" colspan="2"><span class="titupatrimo">
                                                          <label></label>
                                                          <select name="	" id="tipobien" onChange="enviarvalores(this.value)">
                                                            <?php
	       while($rowtbien = mysql_fetch_array($sqltbienn)){
	         echo "<option value=".$rowtbien['idtipbien'].">".$rowtbien['desestcivil']."</option> \n";
             }
	     ?>
                                                          </select>
                                                        </span></td>
                                                        <td height="30">&nbsp;</td>
                                                      </tr>
                                                      <tr>
                                                        <td height="30"><span class="titupatrimo">Ubigeo</span></td>
                                                        <td height="30" colspan="2"><input name="ubigens" type="text" id="ubigens" style="background:#B8E7DF" size="45" /></td>
                                                        <td height="30"><a href="#" onClick="mostrar_desc('buscaubis')"><img src="iconos/seleccionar.png" width="94" height="29" border="0" /></a>
                                                            <div id="buscaubis" style="position:absolute; display:none; width:637px; height:223px; left: 14px; top: 162px; z-index:20; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                                                              <table width="637" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="24" height="29">&nbsp;</td>
                                                                  <td width="585" class="titupatrimo">Seleccionar Ubigeo:</td>
                                                                  <td width="28"><a href="#" onClick="ocultar_desc('buscaubis')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td><label>
                                                                    <input name="buscaubis" type="text" style="background:#FFFFFF" id="buscaubis" size="60" onKeyPress="buscaubigeoss()" />
                                                                  </label></td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td><div id="resulubis" style="width:585px; height:150px; overflow:auto"></div></td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                            </div>
                                                          <input name="codubis" type="hidden" id="codubis" size="15" /></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="15"><span class="titupatrimo">Fecha de Add. o Cons.</span></td>
                                                        <td height="15"><span class="titupatrimo">
                                                          <label></label>
                                                          <label>
                                                          <input type="text" name="fechaconst" style="background:#B8E7DF" class="tcal" id="fechaconst" />
                                                          </label>
                                                        </span></td>
                                                        <td height="30" align="center">&nbsp;</td>
                                                        <td height="30"><a href="#" onClick="gbbiennes()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                                      </tr>
                                                      <tr>
                                                        <td height="15"><div id="vterrestres" style="display:none; width:691px; height:83px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 21px; top: 250px;">
                                                            <table width="671" border="0" cellspacing="0" cellpadding="0">
                                                              <tr>
                                                                <td width="26" >&nbsp;</td>
                                                                <td width="118">&nbsp;</td>
                                                                <td width="138">&nbsp;</td>
                                                                <td width="135">&nbsp;</td>
                                                                <td width="254" align="right"><a href="#" onClick="ocultar_desc('vterrestres')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                                                              </tr>
                                                              <tr>
                                                                <td><label></label></td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio3" value="P" onClick="selecpsm(this.value)" />
                                                                  N° de Placa </td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio4" value="S" onClick="selecpsm(this.value)" />
                                                                  N° de Serie</td>
                                                                <td class="titupatrimo"><input type="radio" name="radio3" id="radio5" value="M" onClick="selecpsm(this.value)" />
                                                                  N° de Motor</td>
                                                              <td><label>
                                                                  <input type="text" name="npsm" style="background:#FFFFFF" id="npsm" />
                                                                </label></td>
                                                              </tr>
                                                              <tr>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td>&nbsp;</td>
                                                                <td><label>
                                                                  <input type="hidden" name="tpsm" id="tpsm" />
                                                                </label></td>
                                                              </tr>
                                                            </table>
                                                        </div>
                                                            <div id="mequipos" style="display:none; width:674px; height:71px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 25px; top: 250px;">
                                                              <table width="661" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="32">&nbsp;</td>
                                                                  <td width="101">&nbsp;</td>
                                                                  <td width="128">&nbsp;</td>
                                                                  <td width="55">&nbsp;</td>
                                                                  <td width="345" align="right"><a href="#" onClick="ocultar_desc('mequipos')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                                                                </tr>
                                                                <tr>
                                                                  <td><label></label></td>
                                                                  <td colspan="3" align="center" class="titupatrimo"> N° de Serie para Maquinaris y Equipos</td>
                                                                  <td><label>
                                                                    <input type="text" name="smaquiequipo" style="background:#FFFFFF" id="smaquiequipo" />
                                                                  </label></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                            </div>
                                                          <div id="oespecificos" style="display:none; width:652px; height:71px; border:#003366 solid 1px; background:#CCCCCC; position:absolute; left: 23px; top: 250px;">
                                                              <table width="629" border="0" cellspacing="0" cellpadding="0">
                                                                <tr>
                                                                  <td width="69">&nbsp;</td>
                                                                  <td width="55">&nbsp;</td>
                                                                  <td width="120">&nbsp;</td>
                                                                  <td width="190">&nbsp;</td>
                                                                  <td width="195" align="right"><a href="#" onClick="ocultar_desc('oespecificos')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                                                                </tr>
                                                                <tr>
                                                                  <td><label></label></td>
                                                                  <td colspan="3" align="center" class="titupatrimo"> Detalle del bien materia del acto juridico</td>
                                                                  <td><label>
                                                                    <input type="text" name="oespecific" style="background:#FFFFFF" id="oespecific" />
                                                                  </label></td>
                                                                </tr>
                                                                <tr>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                  <td>&nbsp;</td>
                                                                </tr>
                                                              </table>
                                                          </div></td>
                                                        <td height="15">&nbsp;</td>
                                                        <td height="30">&nbsp;</td>
                                                        <td height="15">&nbsp;</td>
                                                      </tr>
                                                  </table>
                                                </div>
                                                    <div id="listbiennes" style="display:"></div></td> <!-- DIV ACTUALIZAR BIENES -->
                                                            <div id="verbienesedit" style="display:none; border: #003366 solid 1px; background-color:#CCCCCC; position:absolute; width: 729px; left: 5px; top: 224px; height: 189px;"></div><input name="detbienx" type="hidden" id="detbienx" />
                                              </tr>
                                            </table>
                                      </div></td>
                                  </tr>
                                </table>
                              </div>
                              <!-- LISTADO DE PATRIMONOS --> 
                                  <div id="listpatrimonio" style="display:none"></div></td>
                            </tr>
                          </table>
                      </div>
                    <div id="mantecontra" style="position:absolute; display:none; width:740px; height:250px; left: 52px; top: 348px; z-index:16; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="734" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="19" height="28">&nbsp;</td>
                              <td width="583" class="Estilo42">Editar Contratante</td>
                              <td width="108">&nbsp;</td>
                              <td width="24"><a onClick="limpiaredit();ocultar_desc('mantecontra')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td height="185">&nbsp;</td>
                              <td colspan="2"><div id="rptaedit" style=" height:180px; overflow:auto;"></div></td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td height="33">&nbsp;</td>
                              <td><div id="msjee"></div></td>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="editmrrpp" style="position:absolute; display:none; width:740px; height:272px; left: 54px; top: 337px; z-index:15; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
  <table width="740" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="23" height="26">&nbsp;</td>
      <td width="273" class="Estilo15">Editar  Movimientos RR. PP</td>
      <td width="148">&nbsp;</td>
      <td width="268"><label></label></td>
      <td width="28"><a href="#" onClick="ocultar_desc('editmrrpp')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
    </tr>
    <tr>
      <td height="19">&nbsp;</td>
      <td colspan="3" rowspan="8" valign="top"><div id="edirrpp"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="103">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
          <div id="newmrrpp" style="position:absolute; display:none; width:740px; height:272px; left: 50px; top: 385px; z-index:15; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="23" height="26">&nbsp;</td>
                              <td width="273" class="Estilo15">Ingreso de Movimientos RR. PP</td>
                              <td width="148">&nbsp;</td>
                              <td width="268"><label>
                                <input name="conestado" type="hidden" id="conestado" value="P" size="10" />
                              </label></td>
                              <td width="28"><a href="#" onClick="ocultar_desc('newmrrpp')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td height="19">&nbsp;</td>
                              <td colspan="3" rowspan="8"><table width="678" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="101" height="30" class="camposss">Fecha</td>
                                    <td width="170" height="30" class="camposss"><label>
                                      <input name="fechamov" id="fechamov" type="text"  class="tcal" size="20" style="background:#FFFFFF" value="<?php echo date("d/m/Y"); ?>"  onclick="aumenta2();" onChange="aumenta2();" />
                                    </label></td>
                                    <td width="94" height="30" class="camposss">Vencimiento</td>
                                    <td width="313" height="30"><label>
                                      <input name="vencimiento" type="text" id="vencimiento" class="tcal" size="20" style="background:#FFFFFF" />
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Oficina Registral</td>
                                    <td height="30" class="camposss"><select name="idsedereg" id="idsedereg">
                                        <option value="09" selected="selected">IX - Lima</option>
                                        <?php
	       while($rowsede = mysql_fetch_array($sqlsede)){
	         echo "<option value=".$rowsede['idsedereg'].">".$rowsede['dessede']."</option> \n";
             }
	     ?>
                                    </select></td>
                                    <td height="30" class="camposss">Tramite</td>
                                    <td height="30"><select name="idtiptraoges" id="idtiptraoges">
                                        <?php
	       while($rowstra = mysql_fetch_array($sqltra)){
	         echo "<option value=".$rowstra['idtiptraoges'].">".$rowstra['desctiptraoges']."</option> \n";
             }
	     ?>
                                    </select></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Sección Registro</td>
                                    <td height="30" class="camposss"><select name="idsecreg" id="idsecreg">
                                        <?php
	       while($rowsec = mysql_fetch_array($sqlsec)){
	         echo "<option value=".$rowsec['idsecreg'].">".$rowsec['dessecc']."</option> \n";
             }
	     ?>
                                    </select></td>
                                    <td height="30" class="camposss">Importe</td>
                                    <td height="30"><input name="importee" type="text" id="importee" size="15" style="background:#FFFFFF;" /></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Titulo en RR.PP</td>
                                    <td height="30" class="camposss"><label>
                                      <input name="titulorp" type="text" id="titulorp" size="25" style="background:#FFFFFF" />
                                    </label></td>
                                    <td height="30" class="camposss">Observacion</td>
                                    <td height="30" rowspan="2"><label>
                                      <textarea name="observa" style="background:#FFFFFF" id="observa" cols="45" rows="3"></textarea>
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Estado</td>
                                    <td height="30" class="camposss"><select name="idestreg" id="idestreg" onChange="estadorrpp(this.value)">
                                      <?php
	       while($rowestreg = mysql_fetch_array($sqlestra)){
	         echo "<option value=".$rowestreg['idestreg'].">".$rowestreg['desestreg']."</option> \n";
             }
	     ?>
                                    </select>
                                    <input name="codusuario" type="hidden" id="codusuario" value="<?php echo $_SESSION["id_usu"]; ?>" size="15" /></td>
                                    <td height="30" class="camposss">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Encargado</td>
                                    <td height="30" class="camposss"><label>
                                      <input type="text" style="background:#FFFFFF" readonly="readonly" name="encargado" value="<?php echo $rowwuser["prinom"]." ".$rowwuser["segnom"]." ".$rowwuser["apepat"]." ".$rowwuser["apemat"];
	   ?>" id="encargado" />
                                    </label></td>
                                    <td height="30" colspan="2" class="camposss"><div id="ntitulo" style="display:none; width:366px">
                                        <table width="366" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="96">N° de Titulo</td>
                                            <td width="270"><label>
                                              <input type="text" name="numeroo" id="numeroo" />
                                            </label></td>
                                          </tr>
                                        </table>
                                    </div>
                                        <div id="mayor" style="display:none; width:366px;">
                                          <table width="366" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="96">Mayor Derecho</td>
                                              <td width="270"><label>
                                                <input type="text" name="mayorderecho" id="mayorderecho" />
                                              </label></td>
                                            </tr>
                                          </table>
                                        </div></td>
                                  </tr>
                                  <tr>
                                    <td height="30" class="camposss">Anotación</td>
                                    <td height="30" colspan="3" class="camposss"><table width="564" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="425"><input name="anotacion" type="text" id="anotacion" size="60" style="background:#FFFFFF" /></td>
                                          <td width="139"><a href="#" onClick="validanewmovreg()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                        </tr>
                                      </table>
                                        <label></label></td>
                                  </tr>
                              </table></td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td height="19">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="formurent" style="position:absolute; display:none; width:740px; height:134px; left: 49px; top: 423px; z-index:14; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                      <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="17" height="31">&nbsp;</td>
                              <td colspan="2" class="Estilo31"><span class="style1">Ingrese Formulario</span></td>
                              <td width="382" class="style2">Formularios</td>
                              <td width="30" class="style2"><a href="#" onClick="ocultar_desc('formurent')"><img src="iconos/cerrar.png" width="21" height="20" border="0" /></a></td>
                            </tr>
                            <tr>
                              <td rowspan="3">&nbsp;</td>
                              <td width="94" height="31" class="Estilo31">N° formulario</td>
                            <td width="217"><label>
                                <input type="text" name="numformu" style="background:#FFFFFF" id="numformu" />
                              </label></td>
                              <td colspan="2" rowspan="3" valign="top"><table width="374" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="374"><table width='350' border='1' bordercolor="#333333" cellspacing='0' cellpadding='0'>
                                    <tr>
                                      <td width='175' class="Estilo15" >Numero de Formulario</td>
                                      <td width='175' class="Estilo15" >Monto</td>
                                      <td width='20' >&nbsp;</td>
                                    </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td><div id="listform" style="width:400px; height:70px; overflow:auto;"></div></td>
                                </tr>
                              </table></td>
                          </tr>
                            <tr>
                              <td height="34" class="Estilo31">Monto</td>
                              <td><input type="text" name="monto" style="background:#FFFFFF" id="monto" /></td>
                            </tr>
                            <tr>
                              <td class="Estilo31">&nbsp;</td>
                              <td><a href="#" onClick="grabarformulario()" ><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                            </tr>
                        </table>
                      </div>
                    <div id="preguntas" style="position:absolute; display:none; width:740px; height:150px; left: 48px; top: 322px; z-index:13; background:#CCCCCC; border: 1px solid #333333; border: 1px solid #264965; -moz-border-radius: 13px; -webkit-border-radius: 13px; border-radius: 13px; -moz-box-shadow: 0px 0px 5px #000000; -webkit-box-shadow: 0px 0px 5px #000000; box-shadow: 0px 0px 5px #000000;">
                          <table width="740" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="19" height="26">&nbsp;</td>
                              <td width="690" class="camposss"><strong>Datos de Renta</strong></td>
                              <td width="31" class="camposss"><a onClick="ocultar_desc('preguntas')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><table width="697" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td height="24" colspan="3">
                                    <span class="Estilo31">Presentó Comunicación con Cáracter de DECLARACIÓN JURADA indicando:
                                      <label>
                                          <input name="pregu1" type="hidden" id="pregu1" size="5" />
                                          <input name="pregu2" type="hidden" id="pregu2" size="5" />
                                          <input name="pregu3" type="hidden" id="pregu3" size="5" />
                                    </label>
                                          <label>
                                          <input type="hidden" name="idcontratantee" id="idcontratantee" />
                                          </label>
                                    </span></td>
                                  </tr>
                                  <tr>
                                    <td width="378" height="21"><span class="Estilo31">¿La enajenación generó renta de 3ra Categoría?</span></td>
                                    <td width="120"><span class="Estilo31">
                                      <input type="radio" name="radio"  value="1" onClick="formulita(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio" value="0" onClick="formulita(0)" />
                                    </label>
                                      No </span></td>
                                    <td width="199" rowspan="3"><div id="formulinn"> </div></td>
                                  </tr>
                                  <tr>
                                    <td><span class="Estilo31">¿El bien enajenado era la casa habitación del enajenante?</span></td>
                                    <td><span class="Estilo31">
                                      <input type="radio" name="radio2" id="rtm3" value="1" onClick="formulita1(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio2" id="rtm4" value="0"  onclick="formulita1(0)"/>
                                    </label>
                                      No </span></td>
                                  </tr>
                                  <tr>
                                    <td><span class="Estilo31">¿El impuesto por pagar es cero?</span></td>
                                    <td><span class="Estilo31">
                                      <input type="radio" name="radio3" id="rtm5" value="1" onClick="formulita2(1)" />
                                      Si
                                      <label>
                                        <input type="radio" name="radio3" id="rtm6" value="0" onClick="formulita2(0)" />
                                    </label>
                                      No </span></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="2"><table width="697" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="79" height="31">&nbsp;</td>
                                    <td width="299">&nbsp;</td>
                                    <td width="87"><a href="#" onClick="grabar_renta()"><img src="iconos/grabar.png" width="94" height="29" border="0" /></a></td>
                                    <td width="232"><div id="rptf"></div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="uifpdtparticip" class="uifpdtparticip1" style="display:none; z-index:6;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="21" height="29">&nbsp;</td>
                              <td colspan="4" class="editcampp">UIF - PDT Participa</td>
                              <td width="39"><a  onclick="ocultar_desc('uifpdtparticip')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td colspan="5"><table width="728" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
                                  <tr>
                                    <td><table width="691" bgcolor="#999999" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                                        <tr>
                                          <td width="134"><span class="Estilo15">ACTO</span></td>
                                          <td width="253"><span class="Estilo15">CONTRATANTE</span></td>
                                          <td width="96"><span class="Estilo15">CONDICION</span></td>
                                          <td width="109"><span class="Estilo15">
                                            <label>PORCENTAJE</label>
                                          </span></td>
                                          <td width="33"><span class="Estilo15">UIF</span></td>
                                          <td width="52"><span class="Estilo15">RENTA</span></td>
                                        </tr>
                                    </table></td>
                                  </tr>
                                  <tr>
                                    <td height="242"><input type="hidden" name="xasignacontra" /><input type="hidden" name="xasignacondi" /><input type="hidden" name="xasignavalor" /><div id="asigna" class="asigna"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td height="26">&nbsp;</td>
                              <td width="119"><input type="button" name="button4" id="button4" value="Generar" onClick="mostraruifpdtasigna()" /></td>
                              <td width="232">&nbsp;</td>
                              <td width="124">&nbsp;</td>
                              <td width="223">&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                          </table>
                      </div>
                      <div id="clienbus" class="clienbus1" style="display:none; z-index:7;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="18" height="29">&nbsp;</td>
                              <td width="707" class="editcampp">Agregar Contrante</td>
                              <td width="35"><a  onclick="ocultar_desc('clienbus');format();"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td colspan="3"><table width="724" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="38" bgcolor="#FFFFFF">&nbsp;</td>
                                    <td width="192" bgcolor="#FFFFFF"><label>
                                      <select onChange="selectdocu(this.value);" name="tipoper" id="tipoper" >
                                        <option value = "A" selected="selected">TIPO DE PERSONA</option>
                                        <option value="N">Natural</option>
                                        <option value="J">Jurídica</option>
                                      </select>
                                    </label></td>
                                    <td width="165" bgcolor="#FFFFFF"><div id="tipodocuR"></div></td>
                                    <td width="202" align="right" bgcolor="#FFFFFF"><input name="numdoc" type="text" id="numdoc"  maxlength="11" onClick="evallenght();" /></td>
                                    <td width="127" align="center" bgcolor="#FFFFFF"><a  onclick="evalDocumento()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a></td>
                                </tr>
                                  <tr>
                                    <td height="18" colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="54" colspan="5" bgcolor="#FFFFFF"><div id="busclie" style=" width:720px; height:200px; overflow:auto"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="clienedit" class="clienedit1" style="display:none; z-index:8;">
                          <table width="760" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="18" height="29">&nbsp;</td>
                              <td width="707" class="editcampp">Mantenimiento Contrantes</td>
                              <td width="35"><a  onclick="ocultar_desc('clienedit')"><img src="iconos/cerrar.png" width="21" height="20" /></a></td>
                            </tr>
                            <tr>
                              <td colspan="3"><table width="724" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="724" height="18"><label>
                                      <input type="hidden" name="idcontra" id="idcontra" />
                                    </label></td>
                                  </tr>
                                  <tr>
                                    <td height="54"><div id="manclie" style=" width:720px; height:240px; overflow:auto"> </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                          </table>
                      </div>
                      <div id="tabsss" style="display:none; z-index:1;">
                          <table width="755" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="88" class="camposss">Kardex Conexo</td>
                              <td width="116"><input name="kardexconexo" type="text" id="kardexconexo" size="15" /></td>
                              <td width="47" class="camposss">Notaria</td>
                              <td width="215"><label>
                              <select name="idnotario" id="idnotario">
                                <option value="0">SELECCIONE NOTARIA</option>
                                
                                <?php
			 while($row2=mysql_fetch_array($not)){
		  echo "<option value = ".$row2["idnotario"].">".$row2["descon"]."</option>";  
		  }
		?>
                              </select>
                              </label></td>
                              <td width="140">&nbsp;</td>
                              <td width="158"><input type="button" name="button" id="button" value="Grabar Cambios" onClick="actkardex()" /></td>
                            </tr>
                            <tr>
                              <td colspan="6">&nbsp;</td>
                            </tr>
                            <tr>
                              <td colspan="6"><ul class="tabs">
                                  <li><a href="#tab1">Contratantes</a></li>
                                <li><a href="#tab3">Facturación</a></li>
                                <li><a href="#tab4">Escrituración</a></li>
                                <li><a href="#tab6">Registros Públicos</a></li>
                              </ul>
                                  <div class="Contenedor1">
                                    <div id="tab1" class="Contenido">
                                      <table width="739" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="730" height="15"><table width="700" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="234" bgcolor="#264965"><span class="btnpatrimonial">CONTRATANTES</span></td>
                                                <td width="154" align="center" bgcolor="#264965"><span class="btnpatrimonial">CONDICION</span></td>
                                                <td width="64" align="center" bgcolor="#264965"><span class="btnpatrimonial">FIRMA</span></td>
                                                <td width="97" align="center" bgcolor="#264965"><span class="btnpatrimonial">FECHA FIRMA</span></td>
                                                <td width="139" bgcolor="#264965"><span class="btnpatrimonial">RESPONSABLE</span></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td height="43" ><div id="contratantes" class="contratantes"></div></td>
                                        </tr>
                                        <tr>
                                          <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td><table width="400" border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="149"><a onClick="asi1()"><img src="iconos/mostrarcontratantes.png" width="134" height="28" border="0" /></a></td>
                                                <td width="251"><a onClick="asi2()"><img src="iconos/editarcontratante.png" width="134" height="28" border="0" /></a></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab3" class="Contenido">
                                      <table width="732" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="53">&nbsp;</td>
                                          <td width="175">&nbsp;</td>
                                          <td width="175">&nbsp;</td>
                                          <td width="162">&nbsp;</td>
                                          <td width="167">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td colspan="5"><table width="727" height="209" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td colspan="5" rowspan="8" valign="top"><table width="468" height="72" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
                                                    <tr>
                                                      <td width="110" height="28" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Documentos</span></td>
                                                      <td width="72" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Fecha</span></td>
                                                      <td width="106" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Condición</span></td>
                                                      <td width="95" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Pv</span></td>
                                                      <td width="80" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Saldo</span></td>
                                                    </tr>
                                                    <tr>
                                                      <td height="21">&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                      <td height="21">&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                      <td>&nbsp;</td>
                                                    </tr>
                                                </table></td>
                                                <td width="91" height="26" align="center" bgcolor="#FFFF99"><span class="Estilo23">TNOT</span></td>
                                                <td width="32" align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td width="90" align="center" bgcolor="#FFFF99"><span class="Estilo23">TREG</span></td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">Presupuesto</span></td>
                                              </tr>
                                              <tr>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="pre1" type="text" id="pre1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21"> -</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="pre2" type="text" id="pre2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">Cobrado</span></td>
                                              </tr>
                                              <tr>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="crobado1" type="text" id="crobado1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="cobrado2" type="text" id="cobrado2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label></label>
                                                  Saldo </span></td>
                                              </tr>
                                              <tr>
                                                <td height="22" align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="saldo1" type="text" id="saldo1" size="10" />
                                                  </label>
                                                </span> </td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">-</span></td>
                                                <td align="center" bgcolor="#FFFF99"><span class="Estilo21">
                                                  <label>
                                                  <input name="saldo2" type="text" id="saldo2" size="10" />
                                                  </label>
                                                </span> </td>
                                              </tr>
                                              <tr>
                                                <td height="52" align="center" bgcolor="#FFFF99">&nbsp;</td>
                                                <td align="center" bgcolor="#FFFF99">&nbsp;</td>
                                                <td align="center" bgcolor="#FFFF99">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                          <td>&nbsp;</td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab4" class="Contenido">
                                      <table width="730" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="123" height="28" class="camposss"># de Minuta</td>
                                          <td width="181" class="camposss"><input name="numminuta" type="text" id="numminuta" maxlength="7" /></td>
                                          <td width="79" align="right" class="camposss"># Escritura</td>
                                          <td width="231" class="camposss"><input name="numescritura" type="text" id="numescritura" maxlength="7" /></td>
                                          <td width="126" class="camposss"><div id="mela"></div></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="124" height="30">#Folio del</td>
                                                <td width="100"><label></label>
                                                    <input name="folioini" type="text" id="folioini" size="10" maxlength="7" /></td>
                                                <td width="36">al</td>
                                                <td width="246"><label></label>
                                                    <input name="foliofin" type="text" id="foliofin" size="10" maxlength="7" /></td>
                                                <td width="82">&nbsp;</td>
                                                <td width="66"><label></label></td>
                                                <td width="21">&nbsp;</td>
                                                <td width="65">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="125" height="30">Papel Notarial del</td>
                                                <td width="98"><label></label>
                                                    <input name="papelini" type="text" id="papelini" size="10" /></td>
                                                <td width="38">al</td>
                                                <td width="207"><label></label>
                                                    <input name="papelfin" type="text" id="papelfin" size="10" /></td>
                                                <td width="120">&nbsp;</td>
                                                <td width="66"><label></label>                                                </td>
                                                <td width="21">&nbsp;</td>
                                                <td width="65">&nbsp;</td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td colspan="5" class="camposss"><table width="740" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td width="125" height="30">Fecha de Escritura</td>
                                                <td width="150"><label></label>
                                                    <input name="fechaescritura" type="text" id="fechaescritura" class="tcal" onClick="CompareDatesescritu(frmprotocolares.fechaingreso.value,frmprotocolares.fechaescritura.value)" onChange="CompareDatesescritu(frmprotocolares.fechaingreso.value,frmprotocolares.fechaescritura.value)" size="20" style="background:#B8E7DF" /></td>
                                                <td width="131" align="right">&nbsp;</td>
                                                <td width="120">
                                                 <div id="verifyfirma"><input name="fechaconclusion" type="hidden" id="fechaconclusion" class="tcal" size="20" /></div></td>
                                                <td width="69">&nbsp;</td>
                                                <td width="145"><input type="button" name="btngrabar" id="btngrabar" value="Grabar" onClick="updatekardex()" /></td>
                                            </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                    <div id="tab6" class="Contenido">
                                      <table width="732" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                          <td width="19">&nbsp;</td>
                                          <td width="208"><input name="codmovreg" type="hidden" /><input name="itemcodmovreg" type="hidden" />                                          </td>
                                          <td width="174"><span class="Estilo40"> </span></td>
                                          <td width="109"><span class="Estilo40"> </span></td>
                                          <td width="220">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td height="236" colspan="5"><table width="727" height="217" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td height="63" colspan="5" valign="top"><table width="724" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td height="198" valign="top"><div id="rp" style="width:730px; height:320px; overflow:auto;">
                                                          <table width="710" height="29" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666">
                                                            <tr>
                                                              <td width="70" height="27" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Fecha Movi.</span></td>
                                                              <td width="153" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Tramite</span></td>
                                                              <td width="73" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Nº Titulo</span></td>
                                                              <td width="125" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Estado</span></td>
                                                              <td width="63" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Importe</span></td>
                                                              <td width="115" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Sede Reg</span></td>
                                                              <td width="95" align="center" bgcolor="#CCCCCC"><span class="Estilo18">Sec. Reg</span></td>
                                                              <td width='16' bgcolor="#CCCCCC">&nbsp;</td>
                                                              <td width='18' bgcolor="#CCCCCC">&nbsp;</td>
                                                            </tr>
                                                          </table>
                                                        <div id="vermovi"></div>
                                                      </div></td>
                                                    </tr>
                                                    <tr>
                                                      <td><table width="338" border="0" cellspacing="0" cellpadding="0">
                                                          <tr>
                                                            <td width="152"><a href="#" onClick="newmove();limpiarrpp()"><img src="iconos/neww.png" width="94" height="29" border="0" /></a></td>
                                                            <td width="72">&nbsp;</td>
                                                            <td width="114">&nbsp;</td>
                                                          </tr>
                                                      </table></td>
                                                    </tr>
                                                </table></td>
                                              </tr>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </div>
                                  </div></td>
                            </tr>
                          </table>
                        <input type="button" name="button3" id="button3" value="UIF/PDT Patrimonial" onClick="mostrar_desc('patrimoniallll')"/>
                          <input type="button" name="button2" id="button2" value="UIF/PDT Participa"  onclick="validar4()"/>
                      </div></td>
                  </tr>
              </table></td>
            </tr>
          </table>
      </form></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td></td>
    </tr>
<tr></tr>
</table>
 </div>
<map name="Map" id="Map">
<area shape="rect" coords="5,3,84,23" href="#" onClick="vernewpatri()" />
<area shape="rect" coords="93,2,183,22" href="#" onClick="verlistpatri()" />
</map>
<map name="Map2" id="Map2"><area shape="rect" coords="5,4,93,21" href="#" onClick="agregarbienes()" />
<area shape="rect" coords="103,5,176,22" href="#" onClick="listarbienesss()" />
</map>
<script language="javascript">
	$(document).ready(function(){
		$('#gridPatrimonial').scrollableFixedHeaderTable(700,620,null,null)
		});  
</script>	
</body>

</html>
